#include <mrpt/otherlibs/nanoflann/nanoflann.hpp>
Public Member Functions | |
| PooledAllocator (int blocksize=BLOCKSIZE) | |
| Default constructor. | |
| ~PooledAllocator () | |
| Destructor. | |
| void * | malloc (int size) |
| Returns a pointer to a piece of new memory of the given size in bytes allocated from the pool. | |
| template<typename T > | |
| T * | allocate (size_t count=1) |
| Allocates (using this pool) a generic type T. | |
Public Attributes | |
| int | usedMemory |
| int | wastedMemory |
Private Attributes | |
| int | remaining |
| void * | base |
| void * | loc |
| int | blocksize |
| nanoflann::PooledAllocator::PooledAllocator | ( | int | blocksize = BLOCKSIZE | ) | [inline] |
| nanoflann::PooledAllocator::~PooledAllocator | ( | ) | [inline] |
Destructor.
Frees all the memory allocated in this pool.
Definition at line 464 of file nanoflann.hpp.
| T* nanoflann::PooledAllocator::allocate | ( | size_t | count = 1 | ) | [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 534 of file nanoflann.hpp.
References nanoflann::KNNResultSet::count.
| void* nanoflann::PooledAllocator::malloc | ( | int | size | ) | [inline] |
Returns a pointer to a piece of new memory of the given size in bytes allocated from the pool.
Definition at line 479 of file nanoflann.hpp.
References nanoflann::WORDSIZE, nanoflann::BLOCKSIZE, mrpt::system::os::fprintf(), and nanoflann::KNNResultSet::size().
void* nanoflann::PooledAllocator::base [private] |
Definition at line 439 of file nanoflann.hpp.
int nanoflann::PooledAllocator::blocksize [private] |
Definition at line 441 of file nanoflann.hpp.
void* nanoflann::PooledAllocator::loc [private] |
Definition at line 440 of file nanoflann.hpp.
int nanoflann::PooledAllocator::remaining [private] |
Definition at line 438 of file nanoflann.hpp.
Definition at line 445 of file nanoflann.hpp.
Definition at line 446 of file nanoflann.hpp.
| Page generated by Doxygen 1.7.5 for MRPT 0.9.5 SVN: at Thu Oct 13 21:25:36 UTC 2011 |