cds  1.4.0
Public Member Functions
cds::memory::michael::page_allocator< Heap > Class Template Reference

Page heap based on Heap. More...

#include <cds/memory/michael/allocator.h>

Inheritance diagram for cds::memory::michael::page_allocator< Heap >:
cds::memory::michael::Heap< Options > cds::memory::michael::page_cached_allocator< FreeListCapacity, Heap >

Public Member Functions

 page_allocator (size_t nPageSize)
 Initializes heap. More...
 
void * alloc ()
 Allocate new page.
 
void free (void *pPage)
 Free page pPage.
 
- Public Member Functions inherited from cds::memory::michael::Heap< Options >
 Heap ()
 Heap constructor.
 
 ~Heap ()
 Heap destructor. More...
 
void * alloc (size_t nSize)
 Allocate memory block. More...
 
void free (void *pMemory)
 Free previously allocated memory block. More...
 
void * realloc (void *pMemory, size_t nNewSize)
 Reallocate memory block. More...
 
void * alloc_aligned (size_t nSize, size_t nAlignment)
 Allocate aligned memory block. More...
 
void free_aligned (void *pMemory)
 Free aligned memory block previously allocated by alloc_aligned. More...
 
void summaryStat (summary_stat &st)
 Get instant summary statistics.
 

Additional Inherited Members

- Public Types inherited from cds::memory::michael::Heap< Options >
enum  superblock_state { SBSTATE_ACTIVE = 0, SBSTATE_FULL = 1, SBSTATE_PARTIAL = 2, SBSTATE_EMPTY = 3 }
 Superblock states. More...
 
typedef options::sys_topology sys_topology
 effective system topology
 
typedef options::system_heap system_heap
 effective system heap
 
typedef options::aligned_heap aligned_heap
 effective aligned heap
 
typedef options::sizeclass_selector sizeclass_selector
 effective sizeclass selector
 
typedef options::page_heap page_heap
 effective page heap
 
typedef options::procheap_stat procheap_stat
 effective processor heap statistics
 
typedef options::os_allocated_stat os_allocated_stat
 effective OS-allocated memory statistics
 
typedef
details::bound_checker_selector
< typename
options::check_bounds > 
bound_checker
 effective bound checker
 
typedef
cds::details::type_padding
< processor_heap_base,
c_nAlignment >::type 
processor_heap
 Aligned superblock descriptor.
 
- Static Public Attributes inherited from cds::memory::michael::Heap< Options >
static const size_t c_nMaxBlockInSuperBlock = 1024 * 2
 Max count of blocks in superblock (2 ** 11)
 
- Protected Attributes inherited from cds::memory::michael::Heap< Options >
sys_topology m_Topology
 System topology.
 
system_heap m_LargeHeap
 Heap for large block.
 
aligned_heap m_AlignedHeap
 Internal aligned heap.
 
sizeclass_selector m_SizeClassSelector
 Size-class selector.
 
std::atomic< processor_desc * > * m_arrProcDesc
 array of pointers to the processor descriptors
 
unsigned int m_nProcessorCount
 Processor count.
 
bound_checker m_BoundChecker
 Bound checker.
 
os_allocated_stat m_OSAllocStat
 OS-allocated memory statistics.
 

Detailed Description

template<class Heap = malloc_heap>
class cds::memory::michael::page_allocator< Heap >

Page heap based on Heap.

Page heap can allocate memory by page-sized block only. Heap may be any heap that provides interface like malloc_heap.

This class is one of available implementation of opt::page_heap option.

Constructor & Destructor Documentation

template<class Heap = malloc_heap>
cds::memory::michael::page_allocator< Heap >::page_allocator ( size_t  nPageSize)
inline

Initializes heap.

Parameters
nPageSizepage size in bytes

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

cds 1.4.0 Developed by Maxim Khiszinsky aka khizmax 2007 - 2012
Autogenerated Mon May 20 2013 00:38:01 by Doxygen 1.8.3.1