#include <SlabAllocator.h>
|
| SlabAllocator (const size_t limit, bool opt4hashmap=false) |
|
| SlabAllocator (void *memPool, const size_t limit, size_t pageSize, size_t alignment) |
|
| SlabAllocator (void *memPool, const size_t limit, bool opt4hashmap=false) |
|
| ~SlabAllocator () |
|
void | init (const size_t limit, const double factor, const bool prealloc) |
|
void * | slabs_alloc (const size_t size) |
|
void * | slabs_alloc_unsafe (const size_t size) |
|
void | slabs_free (void *ptr, size_t size) |
|
void | slabs_free_unsafe (void *ptr, size_t size) |
|
void * | do_slabs_alloc (const size_t size) |
|
void | do_slabs_free (void *ptr, const size_t size) |
|
void | do_slabs_free (void *ptr, const size_t size, unsigned int id) |
|
unsigned int | slabs_clsid (const size_t size) |
|
int | do_slabs_newslab (const unsigned int id) |
|
void * | get_page_from_global_pool (void) |
|
int | grow_slab_list (const unsigned int id) |
|
void * | memory_allocate (size_t size) |
|
void | slabs_preallocate (const unsigned int maxslabs) |
|
void | split_slab_page_into_freelist (char *ptr, const unsigned int id) |
|
Definition at line 73 of file SlabAllocator.h.
SlabAllocator::SlabAllocator |
( |
const size_t |
limit, |
|
|
bool |
opt4hashmap = false |
|
) |
| |
SlabAllocator::SlabAllocator |
( |
void * |
memPool, |
|
|
const size_t |
limit, |
|
|
size_t |
pageSize, |
|
|
size_t |
alignment |
|
) |
| |
SlabAllocator::SlabAllocator |
( |
void * |
memPool, |
|
|
const size_t |
limit, |
|
|
bool |
opt4hashmap = false |
|
) |
| |
SlabAllocator::~SlabAllocator |
( |
| ) |
|
void * SlabAllocator::do_slabs_alloc |
( |
const size_t |
size | ) |
|
void SlabAllocator::do_slabs_free |
( |
void * |
ptr, |
|
|
const size_t |
size |
|
) |
| |
void SlabAllocator::do_slabs_free |
( |
void * |
ptr, |
|
|
const size_t |
size, |
|
|
unsigned int |
id |
|
) |
| |
int SlabAllocator::do_slabs_newslab |
( |
const unsigned int |
id | ) |
|
void * SlabAllocator::get_page_from_global_pool |
( |
void |
| ) |
|
int SlabAllocator::grow_slab_list |
( |
const unsigned int |
id | ) |
|
void SlabAllocator::init |
( |
const size_t |
limit, |
|
|
const double |
factor, |
|
|
const bool |
prealloc |
|
) |
| |
Init the subsystem. 1st argument is the limit on no. of bytes to allocate, 0 if no limit. 2nd argument is the growth factor; each slab will use a chunk size equal to the previous slab's chunk size times this factor. 3rd argument specifies if the slab allocator should allocate all memory up front (if true), or allocate memory in chunks as it is needed (if false)
Definition at line 99 of file SlabAllocator.cc.
void * SlabAllocator::memory_allocate |
( |
size_t |
size | ) |
|
void * SlabAllocator::slabs_alloc |
( |
const size_t |
size | ) |
|
void * SlabAllocator::slabs_alloc_unsafe |
( |
const size_t |
size | ) |
|
unsigned int SlabAllocator::slabs_clsid |
( |
const size_t |
size | ) |
|
void SlabAllocator::slabs_free |
( |
void * |
ptr, |
|
|
size_t |
size |
|
) |
| |
void SlabAllocator::slabs_free_unsafe |
( |
void * |
ptr, |
|
|
size_t |
size |
|
) |
| |
void SlabAllocator::slabs_preallocate |
( |
const unsigned int |
maxslabs | ) |
|
void SlabAllocator::split_slab_page_into_freelist |
( |
char * |
ptr, |
|
|
const unsigned int |
id |
|
) |
| |
size_t SlabAllocator::mem_avail = 0 |
|
private |
void* SlabAllocator::mem_base = NULL |
|
private |
void* SlabAllocator::mem_current = NULL |
|
private |
size_t SlabAllocator::mem_limit = 0 |
|
private |
bool SlabAllocator::mem_limit_reached = false |
|
private |
size_t SlabAllocator::mem_malloced = 0 |
|
private |
bool SlabAllocator::opt4hashmap = false |
|
private |
bool SlabAllocator::opt4sharedmem = false |
|
private |
int SlabAllocator::power_largest |
|
private |
pthread_mutex_t SlabAllocator::slabs_lock |
|
private |
bool SlabAllocator::useExternalMemory = false |
|
private |
The documentation for this class was generated from the following files: