Data Structures | |
| struct | tm_adesc |
| Allocation descriptor. More... | |
Defines | |
| #define | PAGESIZE (1 << 13) |
| The mininum size memory block in the OS. | |
| #define | tm_PAGESIZE PAGESIZE |
| The size of blocks allocated from the OS. | |
| #define | tm_TIME_STAT 1 |
| If true, enable timing stats. | |
| #define | tm_name_GUARD 0 |
| If true, enable name guards in internal structures. | |
| #define | tm_block_GUARD 0 |
| If true, enable data corruption guards in internal structures. | |
| #define | tm_GC_THRESHOLD 3 / 4 |
| #define | tm_node_HDR_SIZE sizeof(struct tm_node) |
| Size of tm_node headers. | |
| #define | tm_block_HDR_SIZE sizeof(struct tm_block) |
| Size of tm_block headers. | |
| #define | tm_block_SIZE_MAX (tm_block_SIZE - tm_block_HDR_SIZE) |
| The maxinum size tm_node that can be allocated from a single tm_block. | |
| #define | tm_block_SIZE_MASK ~(((unsigned long) tm_block_SIZE) - 1) |
| Mask to align tm_block pointers. | |
| #define | tm_page_SIZE_MASK ~(((unsigned long) tm_page_SIZE) - 1) |
| Mask to align page pointers. | |
| #define | tm_ptr_TO_END_IS_VALID 0 |
| If true, a pointer immediately after the end of a node is considered to be "in" the node. | |
Enumerations | |
| enum | tm_config { tm_ALLOC_ALIGN = 8, tm_PTR_ALIGN = __alignof(void*), tm_block_SIZE = tm_PAGESIZE, tm_page_SIZE = tm_PAGESIZE, tm_address_range_k = 1UL << (sizeof(void*) * 8 - 10), tm_block_N_MAX = sizeof(void*) / tm_block_SIZE } |
Configuration constants. More... | |
Functions | |
| tm_adesc * | tm_adesc_for_size (tm_adesc *desc, int force_new) |
| ???? | |
| #define PAGESIZE (1 << 13) |
| #define tm_block_GUARD 0 |
If true, enable data corruption guards in internal structures.
Definition at line 34 of file config.h.
Referenced by tm_block_init().
| #define tm_block_HDR_SIZE sizeof(struct tm_block) |
Size of tm_block headers.
Definition at line 45 of file config.h.
Referenced by tm_block_init(), and tm_ptr_to_node().
| #define tm_block_SIZE_MASK ~(((unsigned long) tm_block_SIZE) - 1) |
Mask to align tm_block pointers.
Definition at line 76 of file config.h.
Referenced by tm_ptr_to_block().
| #define tm_block_SIZE_MAX (tm_block_SIZE - tm_block_HDR_SIZE) |
The maxinum size tm_node that can be allocated from a single tm_block.
Definition at line 48 of file config.h.
Referenced by tm_size_hash().
| #define tm_name_GUARD 0 |
| #define tm_node_HDR_SIZE sizeof(struct tm_node) |
Size of tm_node headers.
Definition at line 42 of file config.h.
Referenced by _tm_alloc_type_inner(), and tm_ptr_to_node().
| #define tm_page_SIZE_MASK ~(((unsigned long) tm_page_SIZE) - 1) |
| #define tm_PAGESIZE PAGESIZE |
| #define tm_ptr_TO_END_IS_VALID 0 |
| enum tm_config |
Configuration constants.
| tm_ALLOC_ALIGN |
Nothing smaller than this is actually allocated. |
| tm_PTR_ALIGN |
Alignment of pointers. |
| tm_block_SIZE |
Size of tm_block. Allocations from operating system are aligned to this size. |
| tm_page_SIZE |
Operating system pages are aligned to this size. |
| tm_address_range_k |
The addressable range of process memory in 1024 blocks. |
| tm_block_N_MAX |
Huh? |
Definition at line 54 of file config.h.
00054 { 00055 /*! Nothing smaller than this is actually allocated. */ 00056 tm_ALLOC_ALIGN = 8, 00057 00058 /*! Alignment of pointers. */ 00059 tm_PTR_ALIGN = __alignof(void*), 00060 00061 /*! Size of tm_block. Allocations from operating system are aligned to this size. */ 00062 tm_block_SIZE = tm_PAGESIZE, 00063 00064 /*! Operating system pages are aligned to this size. */ 00065 tm_page_SIZE = tm_PAGESIZE, 00066 00067 /*! The addressable range of process memory in 1024 blocks. */ 00068 tm_address_range_k = 1UL << (sizeof(void*) * 8 - 10), 00069 00070 /*! Huh? */ 00071 tm_block_N_MAX = sizeof(void*) / tm_block_SIZE, 00072 };
????
Definition at line 1368 of file tm.c.
References tm_type::desc, tm_adesc::hidden, tm_adesc::size, tm_size_to_type_2(), and tm_type_new_2().
01369 { 01370 tm_type *t; 01371 01372 if ( ! force_new ) { 01373 t = tm_size_to_type_2(desc->size); 01374 if ( t ) 01375 return t->desc; 01376 } 01377 01378 t = tm_type_new_2(desc->size); 01379 t->desc = desc; 01380 t->desc->hidden = t; 01381 01382 return t->desc; 01383 }

1.6.1