CUBRID Engine
latest
|
Go to the source code of this file.
Classes | |
struct | area_block |
struct | area_blockset_list |
struct | area |
Macros | |
#define | AREA_BLOCKSET_SIZE 256 |
Typedefs | |
typedef struct area_block | AREA_BLOCK |
typedef struct area_blockset_list | AREA_BLOCKSET_LIST |
typedef struct area | AREA |
Functions | |
void | area_init (void) |
void | area_final (void) |
AREA * | area_create (const char *name, size_t element_size, size_t alloc_count) |
void | area_destroy (AREA *area) |
void * | area_alloc (AREA *area) |
int | area_validate (AREA *area, const void *address) |
int | area_free (AREA *area, void *ptr) |
void | area_flush (AREA *area) |
void | area_dump (FILE *fpp) |
#define AREA_BLOCKSET_SIZE 256 |
Definition at line 42 of file area_alloc.h.
Referenced by area_alloc_blockset(), area_find_block(), area_info(), and area_insert_block().
Definition at line 73 of file area_alloc.h.
typedef struct area_block AREA_BLOCK |
Definition at line 50 of file area_alloc.h.
typedef struct area_blockset_list AREA_BLOCKSET_LIST |
Definition at line 62 of file area_alloc.h.
void* area_alloc | ( | AREA * | area | ) |
Definition at line 360 of file area_alloc.c.
References area_alloc_block(), area_insert_block(), area::area_mutex, AREA_PREFIX_INITED, AREA_PREFIX_SIZE, assert, area_block::bitmap, area::block_size, area::blockset_list, area_block::data, lockfree::bitmap::destroy(), area::element_size, free_and_init, lockfree::bitmap::get_entry(), area::hint_block, i, area_blockset_list::items, LF_BITMAP_IS_FULL, area::n_allocs, area_blockset_list::next, NO_ERROR, NULL, pthread_mutex_lock, pthread_mutex_unlock, rv, area_blockset_list::used_count, and VOLATILE_ACCESS.
Referenced by classobj_make_template(), col_new(), make_template(), ml_ext_add(), ml_ext_alloc_link(), obt_make_assignment(), pr_make_ext_value(), set_make_reference(), test_area_proc(), test_area_proc_1(), test_area_proc_2(), and tp_domain_new().
Definition at line 146 of file area_alloc.c.
References area::alloc_count, area_alloc_block(), area_alloc_blockset(), area_List, area::area_mutex, AREA_PREFIX_SIZE, ARG_FILE_LINE, area::block_size, area::blockset_list, area::element_size, ER_ERROR_SEVERITY, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), error(), area::failure_function, free_and_init, area::hint_block, area_blockset_list::items, LF_BITMAP_COUNT_ALIGN, area::n_allocs, area::n_frees, area::name, area::next, NULL, pthread_mutex_init, pthread_mutex_lock, pthread_mutex_unlock, rv, strdup(), strlen, area_blockset_list::used_count, and ws_abort_transaction().
Referenced by classobj_area_init(), obt_area_init(), pr_area_init(), set_area_init(), test_area(), tp_init(), and ws_area_init().
void area_destroy | ( | AREA * | area | ) |
Definition at line 247 of file area_alloc.c.
References area_flush(), assert, free_and_init, area::next, NULL, pthread_mutex_lock, pthread_mutex_unlock, and rv.
Referenced by classobj_area_final(), obt_area_final(), pr_area_final(), set_area_final(), test_area(), tp_final(), and ws_area_final().
void area_dump | ( | FILE * | fpp | ) |
Definition at line 853 of file area_alloc.c.
References area_info(), area::next, NULL, pthread_mutex_lock, pthread_mutex_unlock, and rv.
Referenced by ws_dump().
void area_final | ( | void | ) |
Definition at line 119 of file area_alloc.c.
References area_flush(), free_and_init, area::next, NULL, pthread_mutex_destroy, and set_area_reset().
Referenced by boot_client_all_finalize(), boot_initialize_client(), boot_restart_client(), boot_server_all_finalize(), and test_area().
void area_flush | ( | AREA * | area | ) |
Definition at line 597 of file area_alloc.c.
References area::area_mutex, assert, area_block::bitmap, area::blockset_list, lockfree::bitmap::destroy(), free_and_init, i, area_blockset_list::items, area::name, area_blockset_list::next, NULL, pthread_mutex_destroy, and area_blockset_list::used_count.
Referenced by area_destroy(), and area_final().
int area_free | ( | AREA * | area, |
void * | ptr | ||
) |
Definition at line 514 of file area_alloc.c.
References area::alloc_count, area_find_block(), AREA_PREFIX_FREED, AREA_PREFIX_INITED, AREA_PREFIX_SIZE, ARG_FILE_LINE, assert, area_block::bitmap, area_block::data, area::element_size, ER_AREA_FREE_TWICE, ER_AREA_ILLEGAL_POINTER, ER_ERROR_SEVERITY, er_set(), lockfree::bitmap::free_entry(), area::hint_block, LF_BITMAP_IS_FULL, area::n_frees, NO_ERROR, NULL, and VOLATILE_ACCESS.
Referenced by classobj_free_template(), free_set_reference(), ml_ext_free_link(), obt_free_assignment(), obt_free_template(), pr_free_ext_value(), setobj_free(), test_area_proc(), test_area_proc_1(), test_area_proc_2(), and tp_domain_free().
void area_init | ( | void | ) |
Definition at line 100 of file area_alloc.c.
References ARG_FILE_LINE, ER_AREA_ALREADY_STARTED, er_set(), ER_WARNING_SEVERITY, and NULL.
Referenced by boot_initialize_client(), boot_restart_client(), boot_restart_server(), test_area(), xboot_initialize_server(), and xboot_restart_from_backup().
Definition at line 487 of file area_alloc.c.
References area_find_block(), ARG_FILE_LINE, assert, ER_AREA_ILLEGAL_POINTER, ER_ERROR_SEVERITY, er_set(), error(), NO_ERROR, NULL, and p.
Referenced by ml_ext_free().