#include "ctrump/common/dll.h"
Go to the source code of this file.
Data Structures | |
struct | ctrump_mempool |
メモリアロケータ More... | |
Defines | |
#define | ctrump_mempool_alloc(p, s) ctrump_mempool_alloc_align(p, 3, s) |
allocate memory from pool. memory is aligned to 8. | |
Functions | |
CTRUMP_EXTDEF void | ctrump_mempool_init (struct ctrump_mempool *p, unsigned int size_hint) |
create mempool | |
CTRUMP_EXTDEF void | ctrump_mempool_destroy (struct ctrump_mempool *p) |
delete mempool | |
CTRUMP_EXTDEF void * | ctrump_mempool_alloc_align (struct ctrump_mempool *p, unsigned int align_shift, unsigned int size) |
allocate memory from pool. memory is aligend to `2^align'. | |
CTRUMP_EXTDEF char * | ctrump_mempool_strdup (struct ctrump_mempool *p, char *str) |
関連するオブジェクトをまとめて解放したい場合に使うアロケータ
Definition in file mempool.h.
#define ctrump_mempool_alloc | ( | p, | |||
s | ) | ctrump_mempool_alloc_align(p, 3, s) |
allocate memory from pool. memory is aligned to 8.
p | pool | |
s | size |
Definition at line 89 of file mempool.h.
Referenced by alloc_bb_info(), alloc_pdg_node(), alloc_texpr(), analyze_loop_control_flow(), append_pending(), build_bfs_order(), build_cfg(), build_cfg_for(), build_cfg_while(), build_label_table(), build_loop_tree_func(), build_struct(), cfront_parse(), classify_memop(), convertLogs(), ctrump_analyze(), ctrump_analyze_loop(), ctrump_bmp_alloc(), ctrump_bmp_fill(), ctrump_bmp_zero(), ctrump_build_cfg(), ctrump_env_handle_record_decls(), ctrump_get_array_type(), ctrump_get_functype_begin(), ctrump_get_functype_end(), ctrump_get_functype_next(), ctrump_get_qualified_attr_type(), ctrump_intern(), ctrump_intmap_init_pool(), ctrump_intmap_lookup_impl(), ctrump_intmap_resize_pool(), ctrump_mempool_strdup(), ctrump_varray_copy(), ctrump_varray_init_pool(), ctrump_varray_realloc_pool(), dfs_order(), expr_subscripts_to_loop_subscript(), get_distance_vector(), init_analyze_loop_node_info(), insert_phi(), new_bb(), recog_array_access(), recog_reduction(), and test_index().
CTRUMP_EXTDEF void* ctrump_mempool_alloc_align | ( | struct ctrump_mempool * | p, | |
unsigned int | align_shift, | |||
unsigned int | size | |||
) |
allocate memory from pool. memory is aligend to `2^align'.
p | pool object | |
align_shift | align | |
size | object size |
Definition at line 67 of file mempool.c.
References ctrump_mempool::data_entry, ctrump_mempool::entry_byte_pos, ctrump_mempool::entry_byte_remain, ctrump_mempool::entry_byte_size, ctrump_mempool::entry_index, and ctrump_mempool::entry_num.
Referenced by ctrump_intern().
CTRUMP_EXTDEF void ctrump_mempool_destroy | ( | struct ctrump_mempool * | p | ) |
delete mempool
Definition at line 54 of file mempool.c.
References ctrump_mempool::data_entry, and ctrump_mempool::entry_index.
Referenced by classify_memop(), ctrump_analyze(), ctrump_analyze_loop(), ctrump_build_cfg(), ctrump_destroy_symtab(), ctrump_type_env_destroy(), EnvObject_dealloc(), and get_distance_vector().
CTRUMP_EXTDEF void ctrump_mempool_init | ( | struct ctrump_mempool * | p, | |
unsigned int | size_hint | |||
) |
create mempool
Definition at line 41 of file mempool.c.
References ctrump_mempool::data_entry, ctrump_mempool::entry_byte_pos, ctrump_mempool::entry_byte_remain, ctrump_mempool::entry_byte_size, ctrump_mempool::entry_index, and ctrump_mempool::entry_num.
Referenced by classify_memop(), ctrump_analyze(), ctrump_analyze_loop(), ctrump_build_cfg(), ctrump_indent(), ctrump_init_symtab(), ctrump_prog_file2pprint_format(), ctrump_type_env_init(), env_Init(), and get_distance_vector().
CTRUMP_EXTDEF char* ctrump_mempool_strdup | ( | struct ctrump_mempool * | p, | |
char * | str | |||
) |