cds  1.4.0
Public Types | Static Public Member Functions | Static Public Attributes
cds::memory::michael::default_sizeclass_selector Class Reference

Implementation of opt::sizeclass_selector option. More...

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

Public Types

typedef unsigned int sizeclass_index
 Type of size-class index.
 

Static Public Member Functions

static sizeclass_index size ()
 Returns size-class count.
 
static size_t page_size (size_t nPageType)
 Returns page size in bytes for given page type nPageType.
 
static size_t pageTypeCount ()
 Returns count of page size-class. More...
 
static sizeclass_index find (size_t nSize)
 Returns size-class index for nSize. More...
 
static const size_classat (sizeclass_index nIndex)
 Gets details::size_class struct for size-class index nIndex.
 

Static Public Attributes

static const sizeclass_index c_nNoSizeClass = (unsigned int) (0 - 1)
 "No size class" index
 

Detailed Description

Implementation of opt::sizeclass_selector option.

Default size-class selector can manage memory blocks up to 64K.

Member Function Documentation

static sizeclass_index cds::memory::michael::default_sizeclass_selector::find ( size_t  nSize)
inlinestatic

Returns size-class index for nSize.

For large blocks that cannot be allocated by Michael's allocator the function must return -1.

static size_t cds::memory::michael::default_sizeclass_selector::pageTypeCount ( )
inlinestatic

Returns count of page size-class.

This class supports pages of two types: 64K page for small objects and 1M page for other objects.


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