Data Fields | |
uint32_t | magic |
uint32_t | flags |
pthread_rwlock_t | rwlock |
struct mapping_header | map_header |
uint32_t | name_count |
uint32_t | change_count |
mapnum_t | num_mappings |
mapnum_t | free_mapnum |
mapnum_t | alloc_mapnum |
offset_t | free_offset |
offset_t | alloc_offset |
header in the first mapping
free_mapnum and free_offset provide way to the root of the free data tree. alloc_mapnum and alloc_offset provide way to the root of the allocated data tree.
mapnum_t arena_header::alloc_mapnum |
the mapping where the allocated tree root node is
Definition at line 392 of file arena.h.
Referenced by shm_arena_create(), shm_arena_print(), and shm_arena_print_dot().
offset_t arena_header::alloc_offset |
offset to the top allocated tree root node in CHUNKS
Definition at line 396 of file arena.h.
Referenced by shm_arena_create(), shm_arena_print(), and shm_arena_print_dot().
uint32_t arena_header::change_count |
change_count will be incremented everytime that the arena file changes mappings. This can be compared with the local shm_arena change_count to see if the local process object mappings are up to date with the arena file.
Definition at line 383 of file arena.h.
Referenced by shm_arena_create(), shm_arena_print(), shm_arena_print_dot(), shm_arena_print_list(), shm_get(), shm_name(), shm_remove(), shm_remove_name(), shm_size(), and shm_size_name().
uint32_t arena_header::flags |
contains configuration information. bits: SHM_WITH_SHM_OPEN
Definition at line 367 of file arena.h.
Referenced by shm_arena_create(), shm_arena_destroy(), and shm_arena_print().
mapnum_t arena_header::free_mapnum |
the mapping where the free tree root node is
Definition at line 390 of file arena.h.
Referenced by shm_arena_create(), shm_arena_print(), and shm_arena_print_dot().
offset_t arena_header::free_offset |
offset to the top free tree root node in CHUNKS
Definition at line 394 of file arena.h.
Referenced by shm_arena_create(), shm_arena_print(), and shm_arena_print_dot().
uint32_t arena_header::magic |
magic gets set to ARENA_MAGIC when the arena file is ready to be connected to by any number of processes (and threads)
Definition at line 364 of file arena.h.
Referenced by shm_arena_create(), shm_arena_print(), shm_arena_print_dot(), and shm_arena_print_list().
struct mapping_header arena_header::map_header |
uint32_t arena_header::name_count |
name_count is used to generate a name when one is not given
Definition at line 377 of file arena.h.
Referenced by shm_arena_create(), and shm_get().
mapnum_t arena_header::num_mappings |
num_mappings is the total number of mappings for the arena. The first mapping (mapping 0) is always present so it is special.
Definition at line 387 of file arena.h.
Referenced by shm_arena_create(), and shm_arena_print().
pthread_rwlock_t arena_header::rwlock |
top level read-write lock for this arena used to make the use of the arena shared memory allocator inter-process thread safe.
Definition at line 371 of file arena.h.
Referenced by shm_arena_create().