Structure that provides allocation. More...
#include <alloc.h>
Data Fields | |
lock_quick_type | lock |
lock, only used for the super. | |
struct alloc_cache * | super |
global allocator above this one. More... | |
alloc_special_type * | quar |
singly linked lists of special type. More... | |
size_t | num_quar |
number of items in quarantine. | |
int | thread_num |
thread number for id creation | |
uint64_t | next_id |
next id number to pass out | |
uint64_t | last_id |
last id number possible | |
void(* | cleanup )(void *) |
what function to call to cleanup when last id is reached | |
void * | cleanup_arg |
user arg for cleanup | |
size_t | max_reg_blocks |
how many regional blocks to keep back max | |
size_t | num_reg_blocks |
how many regional blocks are kept now | |
struct regional * | reg_list |
linked list of regional blocks, using regional->next | |
Structure that provides allocation.
Use one per thread. The one on top has a NULL super pointer.
struct alloc_cache* alloc_cache::super |
global allocator above this one.
NULL for none (malloc/free)
Referenced by alloc_clear(), alloc_clear_special(), alloc_get_mem(), alloc_init(), alloc_special_obtain(), alloc_special_release(), alloc_stats(), context_obtain_alloc(), context_release_alloc(), and pushintosuper().
alloc_special_type* alloc_cache::quar |
singly linked lists of special type.
These are free for use.
Referenced by alloc_clear(), alloc_clear_special(), alloc_clear_special_list(), alloc_get_mem(), alloc_special_obtain(), alloc_special_release(), prealloc_setup(), and pushintosuper().