Public Member Functions | Public Attributes | Private Member Functions | 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 free_all ()
 
void * malloc (const size_t req_size)
 
 PooledAllocator ()
 
 ~PooledAllocator ()
 

Public Attributes

size_t usedMemory
 
size_t wastedMemory
 

Private Member Functions

void internal_init ()
 

Private Attributes

void * base
 
void * loc
 
size_t remaining
 

Detailed Description

Definition at line 601 of file nanoflann.hpp.

Constructor & Destructor Documentation

◆ PooledAllocator()

nanoflann::PooledAllocator::PooledAllocator ( )
inline

Default constructor. Initializes a new pool.

Definition at line 626 of file nanoflann.hpp.

◆ ~PooledAllocator()

nanoflann::PooledAllocator::~PooledAllocator ( )
inline

Destructor. Frees all the memory allocated in this pool.

Definition at line 631 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 702 of file nanoflann.hpp.

◆ free_all()

void nanoflann::PooledAllocator::free_all ( )
inline

Frees all allocated memory chunks

Definition at line 634 of file nanoflann.hpp.

◆ internal_init()

void nanoflann::PooledAllocator::internal_init ( )
inlineprivate

Definition at line 612 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 648 of file nanoflann.hpp.

Member Data Documentation

◆ base

void* nanoflann::PooledAllocator::base
private

Definition at line 609 of file nanoflann.hpp.

◆ loc

void* nanoflann::PooledAllocator::loc
private

Definition at line 610 of file nanoflann.hpp.

◆ remaining

size_t nanoflann::PooledAllocator::remaining
private

Definition at line 608 of file nanoflann.hpp.

◆ usedMemory

size_t nanoflann::PooledAllocator::usedMemory

Definition at line 620 of file nanoflann.hpp.

◆ wastedMemory

size_t nanoflann::PooledAllocator::wastedMemory

Definition at line 621 of file nanoflann.hpp.


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


slam_toolbox
Author(s): Steve Macenski
autogenerated on Thu Jan 11 2024 03:37:56