CUBRID Engine  latest
cubmem::single_block_allocator Class Reference

#include <mem_block.hpp>

Collaboration diagram for cubmem::single_block_allocator:
Collaboration graph

Public Member Functions

 single_block_allocator (const block_allocator &base_alloc)
 
 ~single_block_allocator ()
 
const block_allocatorget_block_allocator () const
 
const blockget_block () const
 
char * get_ptr () const
 
size_t get_size () const
 
void reserve (size_t size)
 

Private Member Functions

void allocate (block &b, size_t size)
 
void deallocate (block &b)
 

Private Attributes

const block_allocatorm_base_allocator
 
block m_block
 
block_allocator m_allocator
 

Detailed Description

Definition at line 124 of file mem_block.hpp.

Constructor & Destructor Documentation

cubmem::single_block_allocator::single_block_allocator ( const block_allocator base_alloc)

Definition at line 150 of file mem_block.cpp.

References allocate(), deallocate(), and m_allocator.

cubmem::single_block_allocator::~single_block_allocator ( )

Definition at line 158 of file mem_block.cpp.

References m_base_allocator, m_block, and cubmem::block_allocator::m_dealloc_f.

Member Function Documentation

void cubmem::single_block_allocator::allocate ( block b,
size_t  size 
)
private

Definition at line 164 of file mem_block.cpp.

References assert, cubmem::block::dim, cubmem::block_allocator::m_alloc_f, m_base_allocator, m_block, NULL, and cubmem::block::ptr.

Referenced by single_block_allocator().

Here is the caller graph for this function:

void cubmem::single_block_allocator::deallocate ( block b)
private

Definition at line 175 of file mem_block.cpp.

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

Referenced by single_block_allocator().

Here is the caller graph for this function:

const block & cubmem::single_block_allocator::get_block ( ) const

Definition at line 189 of file mem_block.cpp.

References m_block.

const block_allocator & cubmem::single_block_allocator::get_block_allocator ( ) const

Definition at line 183 of file mem_block.cpp.

References m_allocator.

char * cubmem::single_block_allocator::get_ptr ( void  ) const

Definition at line 195 of file mem_block.cpp.

References m_block, and cubmem::block::ptr.

size_t cubmem::single_block_allocator::get_size ( void  ) const

Definition at line 201 of file mem_block.cpp.

References cubmem::block::dim, and m_block.

void cubmem::single_block_allocator::reserve ( size_t  size)

Definition at line 207 of file mem_block.cpp.

References cubmem::block_allocator::m_alloc_f, m_base_allocator, and m_block.

Member Data Documentation

block_allocator cubmem::single_block_allocator::m_allocator
private

Definition at line 146 of file mem_block.hpp.

Referenced by get_block_allocator(), and single_block_allocator().

const block_allocator& cubmem::single_block_allocator::m_base_allocator
private

Definition at line 143 of file mem_block.hpp.

Referenced by allocate(), reserve(), and ~single_block_allocator().

block cubmem::single_block_allocator::m_block
private

Definition at line 145 of file mem_block.hpp.

Referenced by allocate(), get_block(), get_ptr(), get_size(), reserve(), and ~single_block_allocator().


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