A block allocated from the operating system. More...
#include <block.h>
Data Fields | |
tm_list | list |
tm_type.block list | |
int | id |
The block's id: every block ever allocated from the OS gets a unique id. | |
size_t | size |
Block's actual size (including this header), multiple of tm_block_SIZE. | |
struct tm_type * | type |
The type the block is assigned to. | |
char * | begin |
The beginning of the allocation space. | |
char * | end |
The end of allocation space. | |
char * | next_parcel |
The next parcel pointer for new tm_nodes. | |
size_t | n [tm_CAPACITY+1] |
Number of nodes for this block, indexed by tm_color: includes tm_TOTAL. | |
double | alignment [0] |
Force alignment of tm_nodes to double. |
A block allocated from the operating system.
tm_blocks are parceled into tm_nodes of uniform size based on the size of the tm_block's tm_type.
All tm_nodes parceled from a tm_block have the same tm_type.
A tm_block's address is always aligned to tm_block_SIZE.
Definition at line 26 of file block.h.
double tm_block::alignment[0] |
char* tm_block::begin |
The beginning of the allocation space.
Definition at line 51 of file block.h.
Referenced by _tm_block_reclaim(), _tm_type_add_block(), tm_block_init(), and tm_validate_lists().
char* tm_block::end |
The end of allocation space.
When alloc reaches end, the block is fully parceled.
Definition at line 54 of file block.h.
Referenced by _tm_block_free(), _tm_type_add_block(), and tm_block_init().
int tm_block::id |
The block's id: every block ever allocated from the OS gets a unique id.
Definition at line 42 of file block.h.
Referenced by _tm_block_alloc(), _tm_block_free(), tm_block_init(), and tm_print_block_stats().
size_t tm_block::n[tm_CAPACITY+1] |
Number of nodes for this block, indexed by tm_color: includes tm_TOTAL.
Definition at line 63 of file block.h.
Referenced by _tm_block_unparcel_nodes(), _tm_node_delete(), _tm_node_init(), _tm_node_set_color(), _tm_type_add_block(), tm_block_init(), and tm_block_scavenge().
char* tm_block::next_parcel |
The next parcel pointer for new tm_nodes.
Starts at begin. Nodes are parceled by incrementing this attribute.
Definition at line 57 of file block.h.
Referenced by _tm_block_reclaim(), _tm_node_parcel_some(), tm_block_init(), and tm_validate_lists().
size_t tm_block::size |
Block's actual size (including this header), multiple of tm_block_SIZE.
Definition at line 45 of file block.h.
Referenced by _tm_block_alloc(), _tm_block_alloc_from_free_list(), _tm_block_free(), _tm_block_reclaim(), _tm_block_unparcel_nodes(), tm_block_init(), and tm_print_block_stats().
struct tm_type* tm_block::type [read] |
The type the block is assigned to.
All tm_nodes parceled from this block will be of type->size.
Definition at line 49 of file block.h.
Referenced by _tm_block_reclaim(), _tm_block_unparcel_nodes(), _tm_node_delete(), _tm_node_init(), _tm_node_sweep(), _tm_type_add_block(), _tm_type_remove_block(), tm_block_init(), tm_block_scavenge(), tm_block_to_type(), tm_node_set_color(), tm_node_to_type(), tm_ptr_to_node(), and tm_validate_lists().