GCC Middle and Back End API Reference
base_pool_allocator< TBlockAllocator > Class Template Reference

#include <alloc-pool.h>

Inheritance diagram for base_pool_allocator< TBlockAllocator >:
Collaboration diagram for base_pool_allocator< TBlockAllocator >:

Data Structures

struct  allocation_object
 
struct  allocation_pool_list
 

Public Member Functions

 base_pool_allocator (const char *name, size_t size CXX_MEM_STAT_INFO)
 
 ~base_pool_allocator ()
 
void release ()
 
void release_if_empty ()
 
voidallocate () ATTRIBUTE_MALLOC
 
void remove (void *object)
 
size_t num_elts_current ()
 

Private Member Functions

void initialize ()
 

Static Private Member Functions

static size_t align_eight (size_t x)
 

Private Attributes

const charm_name
 
ALLOC_POOL_ID_TYPE m_id
 
size_t m_elts_per_block
 
allocation_pool_listm_returned_free_list
 
charm_virgin_free_list
 
size_t m_virgin_elts_remaining
 
size_t m_elts_allocated
 
size_t m_elts_free
 
size_t m_blocks_allocated
 
allocation_pool_listm_block_list
 
size_t m_elt_size
 
size_t m_size
 
bool m_initialized
 
mem_location m_location
 

Detailed Description

template<typename TBlockAllocator>
class base_pool_allocator< TBlockAllocator >
Generic pool allocator.   

Constructor & Destructor Documentation

◆ base_pool_allocator()

base_pool_allocator< TBlockAllocator >::base_pool_allocator ( const char * name,
size_t size CXX_MEM_STAT_INFO )
inline

◆ ~base_pool_allocator()

Member Function Documentation

◆ align_eight()

static size_t base_pool_allocator< TBlockAllocator >::align_eight ( size_t x)
inlinestaticprivate

◆ allocate()

◆ initialize()

◆ num_elts_current()

size_t base_pool_allocator< TBlockAllocator >::num_elts_current ( )
inline
Number of elements currently active (not returned to pool).  Used for cheap
consistency checks.   

Referenced by object_allocator< T >::num_elts_current().

◆ release()

◆ release_if_empty()

◆ remove()

Field Documentation

◆ m_block_list

◆ m_blocks_allocated

size_t base_pool_allocator< TBlockAllocator >::m_blocks_allocated
private

◆ m_elt_size

◆ m_elts_allocated

size_t base_pool_allocator< TBlockAllocator >::m_elts_allocated
private

◆ m_elts_free

◆ m_elts_per_block

size_t base_pool_allocator< TBlockAllocator >::m_elts_per_block
private

◆ m_id

◆ m_initialized

bool base_pool_allocator< TBlockAllocator >::m_initialized
private

◆ m_location

◆ m_name

◆ m_returned_free_list

◆ m_size

◆ m_virgin_elts_remaining

size_t base_pool_allocator< TBlockAllocator >::m_virgin_elts_remaining
private

◆ m_virgin_free_list

char* base_pool_allocator< TBlockAllocator >::m_virgin_free_list
private

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