Internals. More...
#include "tm.h"
#include <limits.h>
#include <sys/time.h>
#include <setjmp.h>
#include "tredmill/list.h"
#include "tredmill/config.h"
#include "tredmill/color.h"
#include "tredmill/debug.h"
#include "tredmill/node.h"
#include "tredmill/block.h"
#include "tredmill/type.h"
#include "tredmill/stats.h"
#include "tredmill/barrier.h"
#include "util/bitset.h"
#include "tredmill/os.h"
#include "tredmill/root.h"
#include "tredmill/page.h"
#include "tredmill/ptr.h"
#include "tredmill/mark.h"
#include <stdio.h>
#include <assert.h>
#include <stdlib.h>
#include <stdarg.h>
#include <unistd.h>
#include <string.h>
Go to the source code of this file.
Data Structures | |
struct | tm_root |
A root set region to be scanned for possible pointers. More... | |
struct | tm_data |
Internal data for the allocator. More... | |
Defines | |
#define | tm_type_hash_LEN 101 |
#define | tm_BITMAP_SIZE (tm_address_range_k / (tm_page_SIZE / 1024) / bitset_ELEM_BSIZE) |
The size of a page-indexed bit map. | |
#define | tm_ptr_l tm.ptr_range[0] |
The lowest allocated node address. | |
#define | tm_ptr_h tm.ptr_range[1] |
The highest allocated node address. | |
#define | tm_node_LOOP_INIT(C) tm_node_iterator_init(&tm.node_color_iter[C]) |
Initialize the iterator of all nodes of a given color. | |
#define | tm_node_LOOP(C) |
Begin a loop over all nodes of a given color. | |
#define | tm_node_LOOP_BREAK(C) break |
Break out of a loop over all nodes of a given color. | |
#define | tm_node_LOOP_END(C) |
End a loop over all nodes of a given color. | |
#define | _tm_clear_some_stack_words() |
Enumerations | |
enum | tm_phase { tm_ALLOC, tm_UNMARK, tm_ROOT, tm_SCAN, tm_SWEEP, tm_phase_END } |
The phases of the allocator. More... | |
Functions | |
static __inline void | tm_node_iterator_init (tm_node_iterator *ni) |
Initializes a colored node iterator. | |
static __inline tm_node * | tm_node_iterator_next (tm_node_iterator *ni) |
Returns the next node from the iterator. | |
void | _tm_phase_init (int p) |
Initializes a new allocation phase. | |
void | tm_node_set_color (tm_node *n, tm_block *b, tm_color c) |
Sets the color of a tm_node, in a tm_block. | |
void | _tm_set_stack_ptr (void *ptr) |
Set the stack pointer. | |
void | __tm_clear_some_stack_words () |
Clears the stack and initializes register root set. | |
void * | _tm_alloc_inner (size_t size) |
Allocates a node of a particular size. | |
void * | _tm_alloc_desc_inner (tm_adesc *desc) |
Allocates a node of a particular type. | |
void * | _tm_realloc_inner (void *ptr, size_t size) |
Reallocates a node to a particular size. | |
void | _tm_free_inner (void *ptr) |
Manually returns a node back to its tm_type free list. | |
void | _tm_gc_full_inner () |
Force a full GC sequence. | |
Variables | |
struct tm_data | tm |
Global data. |
Internals.
Definition in file internal.h.
#define tm_BITMAP_SIZE (tm_address_range_k / (tm_page_SIZE / 1024) / bitset_ELEM_BSIZE) |
The size of a page-indexed bit map.
Definition at line 171 of file internal.h.
#define tm_type_hash_LEN 101 |
Definition at line 134 of file internal.h.
Referenced by tm_init(), and tm_size_hash().