|
cds
1.4.0
|
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_class * | at (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 | |
Implementation of opt::sizeclass_selector option.
Default size-class selector can manage memory blocks up to 64K.
|
inlinestatic |
Returns size-class index for nSize.
For large blocks that cannot be allocated by Michael's allocator the function must return -1.
|
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.