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 ()
 
void * allocate () 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 char * m_name
 
ALLOC_POOL_ID_TYPE m_id
 
size_t m_elts_per_block
 
allocation_pool_listm_returned_free_list
 
char * m_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()

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

◆ ~base_pool_allocator()

template<typename TBlockAllocator >
base_pool_allocator< TBlockAllocator >::~base_pool_allocator ( )
inline

Member Function Documentation

◆ align_eight()

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

◆ allocate()

◆ initialize()

template<typename TBlockAllocator >
void base_pool_allocator< TBlockAllocator >::initialize ( )
inlineprivate

◆ num_elts_current()

template<typename TBlockAllocator >
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()

template<typename TBlockAllocator >
void base_pool_allocator< TBlockAllocator >::release ( )
inline

◆ release_if_empty()

template<typename TBlockAllocator >
void base_pool_allocator< TBlockAllocator >::release_if_empty ( )
inline

◆ remove()

Field Documentation

◆ m_block_list

template<typename TBlockAllocator >
allocation_pool_list* base_pool_allocator< TBlockAllocator >::m_block_list
private

◆ m_blocks_allocated

template<typename TBlockAllocator >
size_t base_pool_allocator< TBlockAllocator >::m_blocks_allocated
private

◆ m_elt_size

template<typename TBlockAllocator >
size_t base_pool_allocator< TBlockAllocator >::m_elt_size
private

◆ m_elts_allocated

template<typename TBlockAllocator >
size_t base_pool_allocator< TBlockAllocator >::m_elts_allocated
private

◆ m_elts_free

template<typename TBlockAllocator >
size_t base_pool_allocator< TBlockAllocator >::m_elts_free
private

◆ m_elts_per_block

template<typename TBlockAllocator >
size_t base_pool_allocator< TBlockAllocator >::m_elts_per_block
private

◆ m_id

template<typename TBlockAllocator >
ALLOC_POOL_ID_TYPE base_pool_allocator< TBlockAllocator >::m_id
private

◆ m_initialized

template<typename TBlockAllocator >
bool base_pool_allocator< TBlockAllocator >::m_initialized
private

◆ m_location

template<typename TBlockAllocator >
mem_location base_pool_allocator< TBlockAllocator >::m_location
private

◆ m_name

template<typename TBlockAllocator >
const char* base_pool_allocator< TBlockAllocator >::m_name
private

◆ m_returned_free_list

template<typename TBlockAllocator >
allocation_pool_list* base_pool_allocator< TBlockAllocator >::m_returned_free_list
private

◆ m_size

template<typename TBlockAllocator >
size_t base_pool_allocator< TBlockAllocator >::m_size
private

◆ m_virgin_elts_remaining

template<typename TBlockAllocator >
size_t base_pool_allocator< TBlockAllocator >::m_virgin_elts_remaining
private

◆ m_virgin_free_list

template<typename TBlockAllocator >
char* base_pool_allocator< TBlockAllocator >::m_virgin_free_list
private

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