supereight
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
se::NullMemoryPool< NodeT, BlockT > Class Template Reference

An alternate implementation of se::MemoryPool that can help debug certain memory-related bugs. More...

#include <null_memory_pool.hpp>

Public Member Functions

 ~NullMemoryPool ()
 
NodeTallocateRoot (const Eigen::Vector3i &coord, const int size)
 
NodeTallocateNode (NodeT *const parent_ptr, const int child_idx, const typename NodeT::DataType &init_data)
 
BlockTallocateBlock (NodeT *const parent_ptr, const int child_idx, const typename BlockT::DataType &init_data)
 
void deleteNode (NodeT *const node_ptr)
 
void deleteBlock (BlockT *const block_ptr)
 

Detailed Description

template<typename NodeT, typename BlockT>
class se::NullMemoryPool< NodeT, BlockT >

An alternate implementation of se::MemoryPool that can help debug certain memory-related bugs.

Since se::MemoryPool does its own memory management on top of large heap allocations, it can mask certain use-after-free or out-of-bounds-access bugs and make them undetectable to the address sanitizer (ASAN). If you suspect such issues, use se::NullMemoryPool instead.

Constructor & Destructor Documentation

◆ ~NullMemoryPool()

Member Function Documentation

◆ allocateRoot()

template<typename NodeT , typename BlockT >
NodeT * se::NullMemoryPool< NodeT, BlockT >::allocateRoot ( const Eigen::Vector3i &  coord,
const int  size 
)
inline

◆ allocateNode()

template<typename NodeT , typename BlockT >
NodeT * se::NullMemoryPool< NodeT, BlockT >::allocateNode ( NodeT *const  parent_ptr,
const int  child_idx,
const typename NodeT::DataType &  init_data 
)
inline

◆ allocateBlock()

template<typename NodeT , typename BlockT >
BlockT * se::NullMemoryPool< NodeT, BlockT >::allocateBlock ( NodeT *const  parent_ptr,
const int  child_idx,
const typename BlockT::DataType &  init_data 
)
inline

◆ deleteNode()

template<typename NodeT , typename BlockT >
void se::NullMemoryPool< NodeT, BlockT >::deleteNode ( NodeT *const  node_ptr)
inline

◆ deleteBlock()

template<typename NodeT , typename BlockT >
void se::NullMemoryPool< NodeT, BlockT >::deleteBlock ( BlockT *const  block_ptr)
inline

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