MRPT
1.9.9
|
Definition at line 462 of file nanoflann.hpp.
#include <nanoflann.hpp>
Public Member Functions | |
PooledAllocator () | |
Default constructor. More... | |
~PooledAllocator () | |
Destructor. More... | |
void | free_all () |
Frees all allocated memory chunks. More... | |
void * | malloc (const size_t req_size) |
Returns a pointer to a piece of new memory of the given size in bytes allocated from the pool. More... | |
template<typename T > | |
T * | allocate (const size_t count=1) |
Allocates (using this pool) a generic type T. More... | |
Public Attributes | |
size_t | usedMemory |
size_t | wastedMemory |
Private Member Functions | |
void | internal_init () |
Private Attributes | |
size_t | remaining |
void * | base |
void * | loc |
|
inline |
|
inline |
Destructor.
Frees all the memory allocated in this pool.
Definition at line 496 of file nanoflann.hpp.
|
inline |
Allocates (using this pool) a generic type T.
Params: count = number of instances to allocate. Returns: pointer (of type T*) to memory buffer
Definition at line 568 of file nanoflann.hpp.
Referenced by nanoflann::KDTreeSingleIndexAdaptor< Distance, DatasetAdaptor, DIM, IndexType >::divideTree(), and nanoflann::KDTreeSingleIndexAdaptor< Distance, DatasetAdaptor, DIM, IndexType >::load_tree().
|
inline |
Frees all allocated memory chunks.
Definition at line 501 of file nanoflann.hpp.
Referenced by nanoflann::KDTreeSingleIndexAdaptor< Distance, DatasetAdaptor, DIM, IndexType >::freeIndex().
|
inlineprivate |
Definition at line 474 of file nanoflann.hpp.
|
inline |
Returns a pointer to a piece of new memory of the given size in bytes allocated from the pool.
Definition at line 515 of file nanoflann.hpp.
References nanoflann::BLOCKSIZE, mrpt::system::os::fprintf(), nanoflann::KNNResultSet< DistanceType, IndexType, CountType >::size(), and nanoflann::WORDSIZE.
|
private |
Definition at line 471 of file nanoflann.hpp.
|
private |
Definition at line 472 of file nanoflann.hpp.
|
private |
Definition at line 470 of file nanoflann.hpp.
size_t nanoflann::PooledAllocator::usedMemory |
Definition at line 483 of file nanoflann.hpp.
Referenced by nanoflann::KDTreeSingleIndexAdaptor< Distance, DatasetAdaptor, DIM, IndexType >::usedMemory().
size_t nanoflann::PooledAllocator::wastedMemory |
Definition at line 484 of file nanoflann.hpp.
Referenced by nanoflann::KDTreeSingleIndexAdaptor< Distance, DatasetAdaptor, DIM, IndexType >::usedMemory().
Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: 8fe78517f Sun Jul 14 19:43:28 2019 +0200 at lun oct 28 02:10:00 CET 2019 |