#include <stdio.h>
#include <signal.h>
#include <sys/types.h>
#include "gc_private.h"
Go to the source code of this file.
Defines | |
#define | NWORDS 64 |
Functions | |
void | GC_clear_hdr_marks (hdr *hhdr) |
static void | clear_marks_for_block (struct hblk *h, word dummy) |
static void | clear_marks () |
static word | min_words_allocd () |
word | GC_adj_words_allocd () |
void | GC_clear_a_few_frames () |
bool | GC_gcollect_inner (bool force) |
void | GC_gcollect () |
void | GC_add_to_heap (struct hblk *p, word bytes) |
ptr_t | GC_max (ptr_t x, ptr_t y) |
ptr_t | GC_min (ptr_t x, ptr_t y) |
bool | GC_expand_hp_inner (word n) |
int | GC_expand_hp (int n) |
void | GC_collect_or_expand (word needed_blocks) |
ptr_t | GC_allocobj (word sz, int kind) |
Variables | |
word | GC_non_gc_bytes = 0 |
word | GC_gc_no = 0 |
char * | GC_copyright [] |
signed_word | GC_mem_found |
bool | GC_dont_expand = 0 |
word | GC_free_space_divisor = 4 |
ptr_t | GC_least_plausible_heap_addr = (ptr_t)ONES |
ptr_t | GC_greatest_plausible_heap_addr = 0 |
#define NWORDS 64 |
Referenced by GC_clear_a_few_frames().
static void clear_marks | ( | ) | [static] |
Definition at line 112 of file alloc.c.
References clear_marks_for_block(), and GC_apply_to_all_blocks().
Referenced by GC_gcollect_inner().
Definition at line 100 of file alloc.c.
References GC_clear_hdr_marks(), and HDR.
Referenced by clear_marks().
Definition at line 368 of file alloc.c.
References BYTES_TO_WORDS, GC_freehblk(), GC_greatest_plausible_heap_addr, GC_heapsize, GC_install_header(), GC_least_plausible_heap_addr, HDR, and HDR_BYTES.
Referenced by alloc_mark_stack(), and GC_expand_hp_inner().
word GC_adj_words_allocd | ( | ) |
Definition at line 144 of file alloc.c.
References BYTES_TO_WORDS, GC_mem_freed, GC_non_gc_bytes, GC_non_gc_bytes_at_gc, and GC_words_allocd.
Referenced by GC_gcollect_inner().
Definition at line 495 of file alloc.c.
References GC_collect_or_expand(), GC_continue_reclaim(), GC_new_hblk(), GC_obj_kinds, and obj_kind::ok_freelist.
Referenced by GC_generic_malloc(), and GC_generic_malloc_words_small().
void GC_clear_a_few_frames | ( | ) |
void GC_clear_hdr_marks | ( | hdr * | hhdr | ) |
Definition at line 90 of file alloc.c.
References bzero, and MARK_BITS_SZ.
Referenced by clear_marks_for_block(), and setup_header().
void GC_collect_or_expand | ( | word | needed_blocks | ) |
Definition at line 469 of file alloc.c.
References EXIT, FALSE, GC_dont_gc, GC_err_printf0, GC_expand_hp_inner(), GC_gcollect_inner(), GC_hincr, TRUE, update_GC_hincr, and WARN.
Referenced by GC_allocobj(), and GC_generic_malloc().
int GC_expand_hp | ( | int | n | ) |
Definition at line 454 of file alloc.c.
References DCL_LOCK_STATE, DISABLE_SIGNALS, ENABLE_SIGNALS, GC_expand_hp_inner(), GC_init_inner(), GC_is_initialized, LOCK, and UNLOCK.
Definition at line 413 of file alloc.c.
References FALSE, GC_add_to_heap(), GC_greatest_plausible_heap_addr, GC_hincr, GC_last_heap_addr, GC_least_plausible_heap_addr, GC_max(), GC_min(), GC_prev_heap_addr, GC_printf1, GET_MEM, HBLKSIZE, MAXHINCR, min_words_allocd(), SIGNB, TRUE, and WORDS_TO_BYTES.
Referenced by GC_collect_or_expand(), and GC_expand_hp().
void GC_gcollect | ( | ) |
Definition at line 350 of file alloc.c.
References DCL_LOCK_STATE, DISABLE_SIGNALS, ENABLE_SIGNALS, GC_gcollect_inner(), GC_init_inner(), GC_is_initialized, GC_noop(), LOCK, TRUE, and UNLOCK.
Definition at line 194 of file alloc.c.
References clear_mark_bit_from_hdr, clear_marks(), CLOCK_TYPE, FALSE, GC_adj_words_allocd(), GC_check_heap(), GC_clear_a_few_frames(), GC_debugging_started, GC_dont_expand, GC_finalize(), GC_gc_no, GC_heapsize, GC_mark_roots(), GC_mem_found, GC_mem_freed, GC_n_kinds, GC_non_gc_bytes, GC_non_gc_bytes_at_gc, GC_noop(), GC_obj_kinds, GC_printf0, GC_printf1, GC_printf2, GC_promote_black_lists(), GC_start_reclaim(), GC_words_allocd, GC_words_allocd_before_gc, GET_TIME, HBLKPTR, HDR, MAXOBJSZ, min_words_allocd(), MS_TIME_DIFF, obj_link, set_mark_bit_from_hdr, START_WORLD, STOP_WORLD, TRUE, and WORDS_TO_BYTES.
Referenced by GC_collect_or_expand(), and GC_gcollect().
static word min_words_allocd | ( | ) | [static] |
Definition at line 123 of file alloc.c.
References BYTES_TO_WORDS, dummy, GC_free_space_divisor, GC_heapsize, GC_root_size, and GC_stackbottom.
Referenced by GC_expand_hp_inner(), and GC_gcollect_inner().
char* GC_copyright[] |
bool GC_dont_expand = 0 |
Definition at line 393 of file alloc.c.
Referenced by GC_add_to_heap(), GC_expand_hp_inner(), GC_mark(), and GC_mark_all_stack().
ptr_t GC_least_plausible_heap_addr = (ptr_t)ONES |
Definition at line 392 of file alloc.c.
Referenced by GC_add_to_heap(), GC_expand_hp_inner(), GC_mark(), and GC_mark_all_stack().
Definition at line 15 of file reclaim.c.
Referenced by GC_gcollect_inner(), GC_reclaim_block(), GC_reclaim_clear(), GC_reclaim_clear2(), GC_reclaim_clear4(), GC_reclaim_uninit(), GC_reclaim_uninit2(), and GC_reclaim_uninit4().
word GC_non_gc_bytes = 0 |
Definition at line 73 of file alloc.c.
Referenced by free(), GC_adj_words_allocd(), GC_gcollect_inner(), malloc(), malloc_atomic(), realloc(), and unsafe_free().