CUBRID Engine  latest
cubmem Namespace Reference

Classes

class  appendable_array
 
class  appendible_block
 
struct  block
 
struct  block_allocator
 
class  extensible_array
 
struct  extensible_block
 
class  extensible_stack_block
 
class  pinnable_buffer
 
class  private_allocator
 
class  private_pointer_deleter
 
class  private_unique_ptr
 
class  reference_store
 
class  single_block_allocator
 
class  stack_block
 

Functions

void standard_alloc (block &b, size_t size)
 
void standard_dealloc (block &b)
 
void exponential_standard_alloc (block &b, size_t size)
 
void cstyle_alloc (block &b, size_t size)
 
void cstyle_dealloc (block &b)
 
template<typename T >
T * ptr_align (T *ptr)
 
void private_block_allocate (block &b, size_t size)
 
void private_block_deallocate (block &b)
 
HL_HEAPID get_private_heapid (cubthread::entry *&thread_p)
 
void * private_heap_allocate (cubthread::entry *thread_p, HL_HEAPID heapid, size_t size)
 
void private_heap_deallocate (cubthread::entry *thread_p, HL_HEAPID heapid, void *ptr)
 
void register_private_allocator (cubthread::entry *thread_p)
 
void deregister_private_allocator (cubthread::entry *thread_p)
 
template<typename T , typename U >
bool operator== (const private_allocator< T > &, const private_allocator< U > &)
 
template<typename T , typename U >
bool operator!= (const private_allocator< T > &, const private_allocator< U > &)
 
template<typename Func , typename... Args>
void switch_to_global_allocator_and_call (Func &&func, Args &&...args)
 

Variables

const block_allocator STANDARD_BLOCK_ALLOCATOR { standard_alloc, standard_dealloc }
 
const block_allocator EXPONENTIAL_STANDARD_BLOCK_ALLOCATOR
 
const block_allocator CSTYLE_BLOCK_ALLOCATOR { cstyle_alloc, cstyle_dealloc }
 
const size_t DEFAULT_ALIGNMENT = 8
 
const block_allocator PRIVATE_BLOCK_ALLOCATOR { private_block_allocate, private_block_deallocate }
 

Function Documentation

void cubmem::cstyle_alloc ( block b,
size_t  size 
)

Definition at line 100 of file mem_block.cpp.

References assert, cubmem::block::dim, NULL, and cubmem::block::ptr.

void cubmem::cstyle_dealloc ( block b)

Definition at line 117 of file mem_block.cpp.

References cubmem::block::dim, NULL, and cubmem::block::ptr.

void cubmem::deregister_private_allocator ( cubthread::entry thread_p)

Definition at line 146 of file memory_private_allocator.cpp.

References cubthread::entry::count_private_allocators.

Referenced by operator!=(), and cubmem::private_allocator< T >::~private_allocator().

Here is the caller graph for this function:

void cubmem::exponential_standard_alloc ( block b,
size_t  size 
)
HL_HEAPID cubmem::get_private_heapid ( cubthread::entry *&  thread_p)

Definition at line 80 of file memory_private_allocator.cpp.

References cubthread::get_entry(), NULL, and cubthread::entry::private_heap_id.

Referenced by operator!=(), and cubmem::private_allocator< T >::private_allocator().

Here is the caller graph for this function:

template<typename T , typename U >
bool cubmem::operator!= ( const private_allocator< T > &  ,
const private_allocator< U > &   
)
template<typename T , typename U >
bool cubmem::operator== ( const private_allocator< T > &  ,
const private_allocator< U > &   
)

Definition at line 117 of file memory_private_allocator.hpp.

void cubmem::private_block_allocate ( block b,
size_t  size 
)
void cubmem::private_block_deallocate ( block b)
void * cubmem::private_heap_allocate ( cubthread::entry thread_p,
HL_HEAPID  heapid,
size_t  size 
)

Definition at line 95 of file memory_private_allocator.cpp.

References assert, db_private_alloc, p, and cubthread::entry::private_heap_id.

Referenced by cubmem::private_allocator< T >::allocate(), and operator!=().

Here is the caller graph for this function:

void cubmem::private_heap_deallocate ( cubthread::entry thread_p,
HL_HEAPID  heapid,
void *  ptr 
)

Definition at line 116 of file memory_private_allocator.cpp.

References assert, db_private_free, and cubthread::entry::private_heap_id.

Referenced by cubmem::private_allocator< T >::deallocate(), and operator!=().

Here is the caller graph for this function:

template<typename T >
T * cubmem::ptr_align ( T *  ptr)
inline

Definition at line 221 of file mem_block.hpp.

References DEFAULT_ALIGNMENT.

void cubmem::register_private_allocator ( cubthread::entry thread_p)

Definition at line 136 of file memory_private_allocator.cpp.

References cubthread::entry::count_private_allocators.

Referenced by operator!=(), and cubmem::private_allocator< T >::private_allocator().

Here is the caller graph for this function:

void cubmem::standard_alloc ( block b,
size_t  size 
)

Definition at line 31 of file mem_block.cpp.

References cubmem::block::dim, NULL, and cubmem::block::ptr.

void cubmem::standard_dealloc ( block b)

Definition at line 55 of file mem_block.cpp.

References cubmem::block::dim, NULL, and cubmem::block::ptr.

template<typename Func , typename... Args>
void cubmem::switch_to_global_allocator_and_call ( Func &&  func,
Args &&...  args 
)
inline

Definition at line 351 of file memory_private_allocator.hpp.

References db_change_private_heap(), and NULL.

Referenced by index_builder_loader_task::~index_builder_loader_task().

Here is the caller graph for this function:

Variable Documentation

const block_allocator cubmem::CSTYLE_BLOCK_ALLOCATOR { cstyle_alloc, cstyle_dealloc }

Definition at line 127 of file mem_block.cpp.

Referenced by locator_allocate_copy_area_by_attr_info().

const size_t cubmem::DEFAULT_ALIGNMENT = 8

Definition at line 44 of file mem_block.hpp.

Referenced by ptr_align().

const block_allocator cubmem::EXPONENTIAL_STANDARD_BLOCK_ALLOCATOR
Initial value:
{
std::bind (exponential_standard_alloc, std::placeholders::_1, std::placeholders::_2),
std::bind (standard_dealloc, std::placeholders::_1)
}
void exponential_standard_alloc(block &b, size_t size)
Definition: mem_block.cpp:65
void standard_dealloc(block &b)
Definition: mem_block.cpp:55

Definition at line 94 of file mem_block.cpp.

Referenced by exponential_standard_alloc(), and cubload::semantic_helper::semantic_helper().