Public Member Functions | Public Attributes | Private Attributes | List of all members
nanoflann::PooledAllocator Class Reference

#include <nanoflann.hpp>

Public Member Functions

template<typename T >
T * allocate (const size_t count=1)
 
void * malloc (const size_t req_size)
 
 PooledAllocator (const size_t blocksize=BLOCKSIZE)
 
 ~PooledAllocator ()
 

Public Attributes

size_t usedMemory
 
size_t wastedMemory
 

Private Attributes

void * base
 
size_t blocksize
 
void * loc
 
size_t remaining
 

Detailed Description

Definition at line 457 of file nanoflann.hpp.

Constructor & Destructor Documentation

◆ PooledAllocator()

nanoflann::PooledAllocator::PooledAllocator ( const size_t  blocksize = BLOCKSIZE)
inline

Default constructor. Initializes a new pool.

Definition at line 478 of file nanoflann.hpp.

◆ ~PooledAllocator()

nanoflann::PooledAllocator::~PooledAllocator ( )
inline

Destructor. Frees all the memory allocated in this pool.

Definition at line 491 of file nanoflann.hpp.

Member Function Documentation

◆ allocate()

template<typename T >
T* nanoflann::PooledAllocator::allocate ( const 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 557 of file nanoflann.hpp.

◆ malloc()

void* nanoflann::PooledAllocator::malloc ( const size_t  req_size)
inline

Returns a pointer to a piece of new memory of the given size in bytes allocated from the pool.

Definition at line 504 of file nanoflann.hpp.

Member Data Documentation

◆ base

void* nanoflann::PooledAllocator::base
private

Definition at line 466 of file nanoflann.hpp.

◆ blocksize

size_t nanoflann::PooledAllocator::blocksize
private

Definition at line 468 of file nanoflann.hpp.

◆ loc

void* nanoflann::PooledAllocator::loc
private

Definition at line 467 of file nanoflann.hpp.

◆ remaining

size_t nanoflann::PooledAllocator::remaining
private

Definition at line 465 of file nanoflann.hpp.

◆ usedMemory

size_t nanoflann::PooledAllocator::usedMemory

Definition at line 472 of file nanoflann.hpp.

◆ wastedMemory

size_t nanoflann::PooledAllocator::wastedMemory

Definition at line 473 of file nanoflann.hpp.


The documentation for this class was generated from the following file:


lvr2
Author(s): Thomas Wiemann , Sebastian Pütz , Alexander Mock , Lars Kiesow , Lukas Kalbertodt , Tristan Igelbrink , Johan M. von Behren , Dominik Feldschnieders , Alexander Löhr
autogenerated on Mon Feb 28 2022 22:46:12