tm_block Struct Reference
[Block]

A block allocated from the operating system. More...

#include <block.h>

Collaboration diagram for tm_block:
Collaboration graph
[legend]

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_typetype
 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.

Detailed Description

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.


Field Documentation

Force alignment of tm_nodes to double.

Definition at line 71 of file block.h.

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().

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().

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().

tm_type.block list

Definition at line 28 of file block.h.

Referenced by tm_block_init().

size_t tm_block::n[tm_CAPACITY+1]

Number of nodes for this block, indexed by tm_color: includes tm_TOTAL.

  • tm_CAPACITY: capacity of this block in node of this size.

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().

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().

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 documentation for this struct was generated from the following file:

Generated on Mon Jan 25 06:33:12 2010 for TM(tredmill) by  doxygen 1.6.1