|
unbound 0.1
|
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. | |
| alloc_special_type * | quar |
| singly linked lists of special type. | |
| 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.
| lock_quick_type alloc_cache::lock |
lock, only used for the super.
Referenced by alloc_clear(), alloc_clear_special(), alloc_get_mem(), alloc_init(), alloc_special_obtain(), alloc_special_release(), entry_to_repinfo(), and pushintosuper().
| 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(), pushintosuper(), and ub_ctx_delete().
| 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().
| size_t alloc_cache::num_quar |
number of items in quarantine.
Referenced by alloc_clear(), alloc_clear_special(), alloc_get_mem(), alloc_special_obtain(), alloc_special_release(), alloc_stats(), alloc_test(), prealloc_setup(), and pushintosuper().
| int alloc_cache::thread_num |
thread number for id creation
Referenced by alloc_get_id(), alloc_init(), and libworker_setup().
| uint64_t alloc_cache::next_id |
next id number to pass out
Referenced by alloc_get_id(), and alloc_init().
| uint64_t alloc_cache::last_id |
last id number possible
Referenced by alloc_get_id(), and alloc_init().
| void(*) alloc_cache::cleanup(void *) |
what function to call to cleanup when last id is reached
Referenced by alloc_get_id(), alloc_init(), and alloc_set_id_cleanup().
| void* alloc_cache::cleanup_arg |
user arg for cleanup
Referenced by alloc_get_id(), alloc_init(), and alloc_set_id_cleanup().
| size_t alloc_cache::max_reg_blocks |
how many regional blocks to keep back max
Referenced by alloc_init(), and alloc_reg_release().
| size_t alloc_cache::num_reg_blocks |
how many regional blocks are kept now
Referenced by alloc_clear(), alloc_get_mem(), alloc_init(), alloc_reg_obtain(), alloc_reg_release(), alloc_stats(), and prealloc_blocks().
| struct regional* alloc_cache::reg_list |
linked list of regional blocks, using regional->next
Referenced by alloc_clear(), alloc_init(), alloc_reg_obtain(), alloc_reg_release(), and prealloc_blocks().