C:/Users/Dennis/src/lang/russell.orig/src/gc/gc_private.h File Reference

#include "gc.h"
#include "config.h"
#include "gc_headers.h"
#include <sys/types.h>
#include <time.h>
#include <string.h>

Go to the source code of this file.

Data Structures

struct  ms_entry
struct  hblkhdr
struct  hblk
struct  _GC_arrays
struct  obj_kind

Defines

#define SILENT
#define TRUE   1
#define FALSE   0
#define ALL_INTERIOR_POINTERS
#define PRINTSTATS
#define PRINTTIMES
#define PRINTBLOCKS
#define PRINTBLACKLIST
#define MERGE_SIZES
#define HINCR   16
#define MAXHINCR   512
#define HINCR_MULT   3
#define HINCR_DIV   2
#define GC_MULT   3
#define GC_DIV   4
#define NON_GC_HINCR   ((word)8)
#define CLOCKS_PER_SEC   1000000
#define CLOCK_TYPE   clock_t
#define GET_TIME(x)   x = clock()
#define MS_TIME_DIFF(a, b)
#define bcopy(x, y, n)   memcpy(y,x,n)
#define bzero(x, n)   memset(x, 0, n)
#define GET_MEM(bytes)
#define DCL_LOCK_STATE
#define LOCK()
#define UNLOCK()
#define FASTLOCK()   LOCK()
#define FASTLOCK_SUCCEEDED()   TRUE
#define FASTUNLOCK()   UNLOCK()
#define DISABLE_SIGNALS()   GC_disable_signals()
#define ENABLE_SIGNALS()   GC_enable_signals()
#define STOP_WORLD()
#define START_WORLD()
#define ABORT(s)   abort(s)
#define EXIT()   (void)exit(1)
#define WARN(s)   GC_printf0(s)
#define WORDS_TO_BYTES(x)   ((x)<<2)
#define BYTES_TO_WORDS(x)   ((x)>>2)
#define LOGWL   ((word)5)
#define modWORDSZ(n)   ((n) & 0x1f)
#define WORDSZ   ((word)CPP_WORDSZ)
#define SIGNB   ((word)1 << (WORDSZ-1))
#define BYTES_PER_WORD   ((word)(sizeof (word)))
#define ONES   ((word)(-1))
#define divWORDSZ(n)   ((n) >> LOGWL)
#define CPP_LOG_HBLKSIZE   12
#define LOG_HBLKSIZE   ((word)CPP_LOG_HBLKSIZE)
#define CPP_HBLKSIZE   (1 << CPP_LOG_HBLKSIZE)
#define HBLKSIZE   ((word)CPP_HBLKSIZE)
#define CPP_MAXOBJSZ   BYTES_TO_WORDS(CPP_HBLKSIZE/2)
#define MAXOBJSZ   ((word)CPP_MAXOBJSZ)
#define divHBLKSZ(n)   ((n) >> LOG_HBLKSIZE)
#define modHBLKSZ(n)   ((n) & (HBLKSIZE-1))
#define HBLKPTR(objptr)   ((struct hblk *)(((word) (objptr)) & ~(HBLKSIZE-1)))
#define HBLKDISPL(objptr)   (((word) (objptr)) & (HBLKSIZE-1))
#define HBLKMASK   (HBLKSIZE-1)
#define BITS_PER_HBLK   (HBLKSIZE * 8)
#define MARK_BITS_PER_HBLK   (BITS_PER_HBLK/CPP_WORDSZ)
#define MARK_BITS_SZ   ((MARK_BITS_PER_HBLK + CPP_WORDSZ - 1)/CPP_WORDSZ)
#define DISCARD_WORDS   0
#define BODY_SZ   ((HBLKSIZE-WORDS_TO_BYTES(DISCARD_WORDS))/sizeof(word))
#define HDR_WORDS   ((word)DISCARD_WORDS)
#define HDR_BYTES   ((word)WORDS_TO_BYTES(DISCARD_WORDS))
#define obj_link(p)   (*(ptr_t *)(p))
#define map_entry_type   char
#define OBJ_INVALID   0x7f
#define MAP_ENTRY(map, bytes)   (map)[bytes]
#define MAP_ENTRIES   HBLKSIZE
#define MAP_SIZE   MAP_ENTRIES
#define CPP_MAX_OFFSET   (WORDS_TO_BYTES(OBJ_INVALID) - 1)
#define MAX_OFFSET   ((word)CPP_MAX_OFFSET)
#define VALID_OFFSET_SZ
#define OFFSET_VALID(displ)   GC_valid_offsets[displ]
#define GC_objfreelist   GC_arrays._objfreelist
#define GC_aobjfreelist   GC_arrays._aobjfreelist
#define GC_valid_offsets   GC_arrays._valid_offsets
#define GC_modws_valid_offsets   GC_arrays._modws_valid_offsets
#define GC_reclaim_list   GC_arrays._reclaim_list
#define GC_areclaim_list   GC_arrays._areclaim_list
#define GC_obj_map   GC_arrays._obj_map
#define GC_last_heap_addr   GC_arrays._last_heap_addr
#define GC_prev_heap_addr   GC_arrays._prev_heap_addr
#define GC_words_allocd   GC_arrays._words_allocd
#define GC_non_gc_bytes_at_gc   GC_arrays._non_gc_bytes_at_gc
#define GC_mem_freed   GC_arrays._mem_freed
#define GC_heapsize   GC_arrays._heapsize
#define GC_words_allocd_before_gc   GC_arrays._words_allocd_before_gc
#define GC_size_map   GC_arrays._size_map
#define beginGC_arrays   ((ptr_t)(&GC_arrays))
#define endGC_arrays   (((ptr_t)(&GC_arrays)) + (sizeof GC_arrays))
#define MAXOBJKINDS   16
#define PTRFREE   0
#define NORMAL   1
#define update_GC_hincr
#define abs(x)   ((x) < 0? (-(x)) : (x))
#define mark_bit_from_hdr(hhdr, n)
#define set_mark_bit_from_hdr(hhdr, n)
#define clear_mark_bit_from_hdr(hhdr, n)
#define GC_ADD_TO_BLACK_LIST_NORMAL(bits)   GC_add_to_black_list_normal(bits)
#define GC_printf0(f)   GC_printf(f, 0l, 0l, 0l, 0l, 0l, 0l)
#define GC_printf1(f, a)   GC_printf(f, (long)a, 0l, 0l, 0l, 0l, 0l)
#define GC_printf2(f, a, b)   GC_printf(f, (long)a, (long)b, 0l, 0l, 0l, 0l)
#define GC_printf3(f, a, b, c)   GC_printf(f, (long)a, (long)b, (long)c, 0l, 0l, 0l)
#define GC_printf4(f, a, b, c, d)
#define GC_printf5(f, a, b, c, d, e)
#define GC_printf6(f, a, b, c, d, e, g)
#define GC_err_printf0(f)   GC_err_puts(f)
#define GC_err_printf1(f, a)   GC_err_printf(f, (long)a, 0l, 0l, 0l, 0l, 0l)
#define GC_err_printf2(f, a, b)   GC_err_printf(f, (long)a, (long)b, 0l, 0l, 0l, 0l)
#define GC_err_printf3(f, a, b, c)
#define GC_err_printf4(f, a, b, c, d)
#define GC_err_printf5(f, a, b, c, d, e)
#define GC_err_printf6(f, a, b, c, d, e, g)

Typedefs

typedef int bool
typedef char * ptr_t
typedef char * extern_ptr_t
typedef struct ms_entry mse
typedef mse *(* mark_proc )()

Functions

caddr_t sbrk ()
void GC_disable_signals ()
void GC_enable_signals ()
void GC_apply_to_all_blocks ()
mseGC_no_mark_proc ()
mseGC_normal_mark_proc ()
void GC_mark_init ()
void GC_mark ()
void GC_mark_reliable ()
void GC_mark_all ()
void GC_mark_all_stack ()
void GC_remark ()
void GC_tl_mark ()
void GC_clear_hdr_marks ()
void GC_add_roots_inner ()
void GC_register_dynamic_libraries ()
ptr_t GC_get_stack_base ()
void GC_register_data_segments ()
void GC_add_to_black_list_normal ()
void GC_add_to_black_list_stack ()
struct hblkGC_is_black_listed ()
void GC_promote_black_lists ()
ptr_t GC_scratch_alloc ()
void GC_invalidate_map ()
void GC_add_map_entry ()
void GC_register_displacement_inner ()
void GC_init_inner ()
void GC_new_hblk ()
struct hblkGC_allochblk ()
void GC_freehblk ()
void GC_start_reclaim ()
void GC_continue_reclaim ()
bool GC_gcollect_inner ()
void GC_collect_or_expand ()
void GC_init ()
ptr_t GC_generic_malloc ()
ptr_t GC_generic_malloc_words_small ()
ptr_t GC_allocobj ()
void GC_install_header ()
void GC_install_counts ()
void GC_remove_header ()
void GC_remove_counts ()
hdrGC_find_header ()
void GC_finalize ()
void GC_add_to_heap ()
void GC_print_obj ()
void GC_check_heap ()
void GC_printf ()
void GC_err_printf ()
void GC_err_puts ()

Variables

struct _GC_arrays GC_arrays
struct obj_kind GC_obj_kinds [MAXOBJKINDS]
int GC_n_kinds
char * GC_invalid_map
struct hblkGC_hblkfreelist
bool GC_is_initialized
ptr_t GC_stackbottom
word GC_hincr
word GC_root_size
bool GC_debugging_started
ptr_t GC_least_plausible_heap_addr
ptr_t GC_greatest_plausible_heap_addr


Define Documentation

#define ABORT (  )     abort(s)

Definition at line 322 of file gc_private.h.

Referenced by GC_add_roots_inner(), GC_debug_free(), GC_debug_realloc(), GC_finalize(), GC_mark_all(), GC_mark_roots(), GC_printf(), GC_register_disappearing_link(), GC_register_displacement_inner(), and GC_register_finalizer().

#define abs (  )     ((x) < 0? (-(x)) : (x))

Definition at line 650 of file gc_private.h.

#define ALL_INTERIOR_POINTERS

Definition at line 65 of file gc_private.h.

#define bcopy ( x,
y,
 )     memcpy(y,x,n)

Definition at line 211 of file gc_private.h.

Referenced by GC_debug_realloc(), and GC_realloc().

#define beginGC_arrays   ((ptr_t)(&GC_arrays))

Definition at line 595 of file gc_private.h.

Referenced by GC_add_roots_inner().

#define BITS_PER_HBLK   (HBLKSIZE * 8)

Definition at line 400 of file gc_private.h.

#define BODY_SZ   ((HBLKSIZE-WORDS_TO_BYTES(DISCARD_WORDS))/sizeof(word))

Definition at line 461 of file gc_private.h.

#define BYTES_PER_WORD   ((word)(sizeof (word)))

Definition at line 358 of file gc_private.h.

#define BYTES_TO_WORDS (  )     ((x)>>2)

Definition at line 344 of file gc_private.h.

Referenced by GC_add_map_entry(), GC_add_to_heap(), GC_adj_words_allocd(), GC_allochblk(), GC_check_annotated_obj(), GC_has_debug_info(), GC_mark(), GC_print_smashed_obj(), GC_realloc(), GC_reclaim_block(), GC_store_debug_info(), and min_words_allocd().

#define bzero ( x,
 )     memset(x, 0, n)

Definition at line 212 of file gc_private.h.

Referenced by GC_allochblk(), GC_clear_bl(), GC_clear_hdr_marks(), GC_clear_stack_inner(), GC_free(), GC_new_hblk(), GC_realloc(), and get_index().

#define clear_mark_bit_from_hdr ( hhdr,
 ) 

Value:

(hhdr)->hb_marks[divWORDSZ(n)] \
                                &= ~(1 << modWORDSZ(n))

Definition at line 681 of file gc_private.h.

Referenced by GC_clear_mark_bit(), and GC_gcollect_inner().

#define CLOCK_TYPE   clock_t

Definition at line 193 of file gc_private.h.

Referenced by GC_gcollect_inner().

#define CLOCKS_PER_SEC   1000000

Definition at line 181 of file gc_private.h.

#define CPP_HBLKSIZE   (1 << CPP_LOG_HBLKSIZE)

Definition at line 372 of file gc_private.h.

#define CPP_LOG_HBLKSIZE   12

Definition at line 370 of file gc_private.h.

#define CPP_MAX_OFFSET   (WORDS_TO_BYTES(OBJ_INVALID) - 1)

Definition at line 553 of file gc_private.h.

#define CPP_MAXOBJSZ   BYTES_TO_WORDS(CPP_HBLKSIZE/2)

Definition at line 379 of file gc_private.h.

#define DCL_LOCK_STATE

Definition at line 267 of file gc_private.h.

Referenced by GC_add_roots(), GC_call_with_alloc_lock(), GC_clear_roots(), GC_expand_hp(), GC_gcollect(), GC_generic_malloc(), GC_generic_malloc_words_small(), GC_malloc(), GC_malloc_atomic(), GC_register_disappearing_link(), GC_register_displacement(), GC_register_finalizer(), GC_store_debug_info(), GC_unregister_disappearing_link(), and run_one_test().

 
#define DISABLE_SIGNALS (  )     GC_disable_signals()

Definition at line 292 of file gc_private.h.

Referenced by GC_add_roots(), GC_call_with_alloc_lock(), GC_clear_roots(), GC_expand_hp(), GC_gcollect(), GC_generic_malloc(), GC_generic_malloc_words_small(), GC_register_disappearing_link(), GC_register_displacement(), GC_register_finalizer(), and GC_unregister_disappearing_link().

#define DISCARD_WORDS   0

Definition at line 454 of file gc_private.h.

#define divHBLKSZ (  )     ((n) >> LOG_HBLKSIZE)

Definition at line 382 of file gc_private.h.

Referenced by GC_generic_malloc(), and GC_is_black_listed().

#define divWORDSZ (  )     ((n) >> LOGWL)

Definition at line 360 of file gc_private.h.

Referenced by GC_is_black_listed(), GC_mark(), GC_reclaim_clear2(), GC_reclaim_clear4(), GC_reclaim_uninit2(), and GC_reclaim_uninit4().

 
#define ENABLE_SIGNALS (  )     GC_enable_signals()

Definition at line 294 of file gc_private.h.

Referenced by GC_add_roots(), GC_call_with_alloc_lock(), GC_clear_roots(), GC_expand_hp(), GC_gcollect(), GC_generic_malloc(), GC_generic_malloc_words_small(), GC_register_disappearing_link(), GC_register_displacement(), GC_register_finalizer(), and GC_unregister_disappearing_link().

#define endGC_arrays   (((ptr_t)(&GC_arrays)) + (sizeof GC_arrays))

Definition at line 596 of file gc_private.h.

Referenced by GC_add_roots_inner().

 
#define EXIT (  )     (void)exit(1)

Definition at line 330 of file gc_private.h.

Referenced by alloc_mark_stack(), and GC_collect_or_expand().

#define FALSE   0

Definition at line 33 of file gc_private.h.

 
#define FASTLOCK (  )     LOCK()

Definition at line 270 of file gc_private.h.

Referenced by GC_malloc(), and GC_malloc_atomic().

 
#define FASTLOCK_SUCCEEDED (  )     TRUE

Definition at line 271 of file gc_private.h.

Referenced by GC_malloc(), and GC_malloc_atomic().

 
#define FASTUNLOCK (  )     UNLOCK()

Definition at line 272 of file gc_private.h.

Referenced by GC_malloc(), and GC_malloc_atomic().

#define GC_ADD_TO_BLACK_LIST_NORMAL ( bits   )     GC_add_to_black_list_normal(bits)

Definition at line 716 of file gc_private.h.

Referenced by GC_mark().

#define GC_aobjfreelist   GC_arrays._aobjfreelist

Definition at line 574 of file gc_private.h.

Referenced by GC_malloc_atomic().

#define GC_areclaim_list   GC_arrays._areclaim_list

Definition at line 578 of file gc_private.h.

#define GC_DIV   4

Definition at line 166 of file gc_private.h.

#define GC_err_printf0 (  )     GC_err_puts(f)

Definition at line 849 of file gc_private.h.

Referenced by alloc_mark_stack(), GC_check_heap_block(), GC_collect_or_expand(), GC_debug_free(), GC_debug_realloc(), and GC_scratch_alloc().

#define GC_err_printf1 ( f,
a   )     GC_err_printf(f, (long)a, 0l, 0l, 0l, 0l, 0l)

Definition at line 850 of file gc_private.h.

Referenced by GC_debug_free(), GC_debug_malloc(), GC_debug_malloc_atomic(), GC_debug_realloc(), GC_print_obj(), and GC_print_smashed_obj().

#define GC_err_printf2 ( f,
a,
 )     GC_err_printf(f, (long)a, (long)b, 0l, 0l, 0l, 0l)

Definition at line 851 of file gc_private.h.

Referenced by GC_print_obj(), and GC_print_smashed_obj().

#define GC_err_printf3 ( f,
a,
b,
 ) 

Value:

GC_err_printf(f, (long)a, (long)b, (long)c, \
                                                  0l, 0l, 0l)

Definition at line 852 of file gc_private.h.

#define GC_err_printf4 ( f,
a,
b,
c,
 ) 

Value:

GC_err_printf(f, (long)a, (long)b, \
                                                    (long)c, (long)d, 0l, 0l)

Definition at line 854 of file gc_private.h.

#define GC_err_printf5 ( f,
a,
b,
c,
d,
 ) 

Value:

GC_err_printf(f, (long)a, (long)b, \
                                                      (long)c, (long)d, \
                                                      (long)e, 0l)

Definition at line 856 of file gc_private.h.

#define GC_err_printf6 ( f,
a,
b,
c,
d,
e,
 ) 

Value:

GC_err_printf(f, (long)a, (long)b, \
                                                        (long)c, (long)d, \
                                                        (long)e, (long)g)

Definition at line 859 of file gc_private.h.

#define GC_heapsize   GC_arrays._heapsize

Definition at line 585 of file gc_private.h.

Referenced by check_heap_stats(), GC_add_to_heap(), GC_gcollect_inner(), and min_words_allocd().

#define GC_last_heap_addr   GC_arrays._last_heap_addr

Definition at line 580 of file gc_private.h.

Referenced by GC_expand_hp_inner().

#define GC_mem_freed   GC_arrays._mem_freed

Definition at line 584 of file gc_private.h.

Referenced by GC_adj_words_allocd(), GC_free(), and GC_gcollect_inner().

#define GC_modws_valid_offsets   GC_arrays._modws_valid_offsets

Definition at line 576 of file gc_private.h.

Referenced by GC_add_to_black_list_normal(), and GC_register_displacement_inner().

#define GC_MULT   3

Definition at line 163 of file gc_private.h.

#define GC_non_gc_bytes_at_gc   GC_arrays._non_gc_bytes_at_gc

Definition at line 583 of file gc_private.h.

Referenced by GC_adj_words_allocd(), and GC_gcollect_inner().

#define GC_obj_map   GC_arrays._obj_map

Definition at line 579 of file gc_private.h.

Referenced by GC_add_map_entry(), GC_register_displacement_inner(), and setup_header().

#define GC_objfreelist   GC_arrays._objfreelist

Definition at line 573 of file gc_private.h.

Referenced by GC_malloc().

#define GC_prev_heap_addr   GC_arrays._prev_heap_addr

Definition at line 581 of file gc_private.h.

Referenced by GC_expand_hp_inner().

#define GC_printf0 (  )     GC_printf(f, 0l, 0l, 0l, 0l, 0l, 0l)

Definition at line 837 of file gc_private.h.

Referenced by GC_gcollect_inner(), GC_reclaim_block(), and GC_start_reclaim().

#define GC_printf1 ( f,
a   )     GC_printf(f, (long)a, 0l, 0l, 0l, 0l, 0l)

Definition at line 838 of file gc_private.h.

Referenced by GC_add_map_entry(), GC_add_to_black_list_normal(), GC_add_to_black_list_stack(), GC_expand_hp_inner(), GC_freehblk(), GC_gcollect_inner(), GC_mark_reliable(), and GC_reclaim_block().

#define GC_printf2 ( f,
a,
 )     GC_printf(f, (long)a, (long)b, 0l, 0l, 0l, 0l)

Definition at line 839 of file gc_private.h.

Referenced by GC_freehblk(), and GC_gcollect_inner().

#define GC_printf3 ( f,
a,
b,
 )     GC_printf(f, (long)a, (long)b, (long)c, 0l, 0l, 0l)

Definition at line 840 of file gc_private.h.

#define GC_printf4 ( f,
a,
b,
c,
 ) 

Value:

GC_printf(f, (long)a, (long)b, (long)c, \
                                            (long)d, 0l, 0l)

Definition at line 841 of file gc_private.h.

#define GC_printf5 ( f,
a,
b,
c,
d,
 ) 

Value:

GC_printf(f, (long)a, (long)b, (long)c, \
                                              (long)d, (long)e, 0l)

Definition at line 843 of file gc_private.h.

#define GC_printf6 ( f,
a,
b,
c,
d,
e,
 ) 

Value:

GC_printf(f, (long)a, (long)b, (long)c, \
                                                (long)d, (long)e, (long)g)

Definition at line 845 of file gc_private.h.

#define GC_reclaim_list   GC_arrays._reclaim_list

Definition at line 577 of file gc_private.h.

#define GC_size_map   GC_arrays._size_map

Definition at line 592 of file gc_private.h.

Referenced by GC_generic_malloc(), GC_init_size_map(), GC_malloc(), and GC_malloc_atomic().

#define GC_valid_offsets   GC_arrays._valid_offsets

Definition at line 575 of file gc_private.h.

Referenced by GC_register_displacement_inner().

#define GC_words_allocd   GC_arrays._words_allocd

Definition at line 582 of file gc_private.h.

Referenced by check_heap_stats(), GC_adj_words_allocd(), GC_gcollect_inner(), GC_generic_malloc(), GC_generic_malloc_words_small(), GC_malloc(), and GC_malloc_atomic().

#define GC_words_allocd_before_gc   GC_arrays._words_allocd_before_gc

Definition at line 586 of file gc_private.h.

Referenced by check_heap_stats(), and GC_gcollect_inner().

#define GET_MEM ( bytes   ) 

Value:

HBLKPTR(sbrk((int)(bytes + HBLKSIZE)) \
                                      + HBLKSIZE-1)

Definition at line 233 of file gc_private.h.

Referenced by alloc_mark_stack(), GC_expand_hp_inner(), and GC_scratch_alloc().

#define GET_TIME (  )     x = clock()

Definition at line 194 of file gc_private.h.

Referenced by GC_gcollect_inner().

#define HBLKDISPL ( objptr   )     (((word) (objptr)) & (HBLKSIZE-1))

Definition at line 388 of file gc_private.h.

Referenced by GC_mark().

#define HBLKMASK   (HBLKSIZE-1)

Definition at line 398 of file gc_private.h.

Referenced by GC_allochblk(), GC_freehblk(), and GC_realloc().

#define HBLKPTR ( objptr   )     ((struct hblk *)(((word) (objptr)) & ~(HBLKSIZE-1)))

Definition at line 386 of file gc_private.h.

Referenced by GC_base(), GC_clear_mark_bit(), GC_free(), GC_gcollect_inner(), GC_has_debug_info(), GC_is_marked(), GC_mark(), GC_realloc(), and GC_set_mark_bit().

#define HBLKSIZE   ((word)CPP_HBLKSIZE)

Definition at line 373 of file gc_private.h.

Referenced by GC_add_map_entry(), GC_allochblk(), GC_check_heap_block(), GC_expand_hp_inner(), GC_freehblk(), GC_invalidate_map(), GC_mark(), GC_new_hblk(), GC_realloc(), GC_reclaim_block(), GC_reclaim_clear(), GC_reclaim_clear2(), GC_reclaim_clear4(), GC_reclaim_uninit(), GC_reclaim_uninit2(), GC_reclaim_uninit4(), GC_register_displacement_inner(), and GC_scratch_alloc().

#define HDR_BYTES   ((word)WORDS_TO_BYTES(DISCARD_WORDS))

Definition at line 471 of file gc_private.h.

Referenced by GC_add_map_entry(), GC_add_to_heap(), GC_allochblk(), GC_base(), GC_freehblk(), GC_mark(), GC_realloc(), and GC_register_displacement_inner().

#define HDR_WORDS   ((word)DISCARD_WORDS)

Definition at line 470 of file gc_private.h.

Referenced by GC_base(), GC_check_heap_block(), GC_reclaim_block(), GC_reclaim_clear(), GC_reclaim_clear2(), GC_reclaim_clear4(), GC_reclaim_uninit(), GC_reclaim_uninit2(), GC_reclaim_uninit4(), and remark_block().

#define HINCR   16

Definition at line 159 of file gc_private.h.

Referenced by GC_scratch_alloc().

#define HINCR_DIV   2

Definition at line 162 of file gc_private.h.

#define HINCR_MULT   3

Definition at line 161 of file gc_private.h.

 
#define LOCK (  ) 

Definition at line 268 of file gc_private.h.

Referenced by GC_add_roots(), GC_call_with_alloc_lock(), GC_clear_roots(), GC_expand_hp(), GC_gcollect(), GC_generic_malloc(), GC_generic_malloc_words_small(), GC_register_disappearing_link(), GC_register_displacement(), GC_register_finalizer(), GC_store_debug_info(), GC_unregister_disappearing_link(), and run_one_test().

#define LOG_HBLKSIZE   ((word)CPP_LOG_HBLKSIZE)

Definition at line 371 of file gc_private.h.

Referenced by GC_apply_to_all_blocks(), and get_index().

#define LOGWL   ((word)5)

Definition at line 345 of file gc_private.h.

Referenced by amatch(), and findmpsig().

#define MAP_ENTRIES   HBLKSIZE

Definition at line 551 of file gc_private.h.

#define MAP_ENTRY ( map,
bytes   )     (map)[bytes]

Definition at line 549 of file gc_private.h.

Referenced by GC_add_map_entry(), GC_invalidate_map(), and GC_mark().

#define map_entry_type   char

Definition at line 547 of file gc_private.h.

Referenced by GC_mark().

#define MAP_SIZE   MAP_ENTRIES

Definition at line 552 of file gc_private.h.

Referenced by GC_add_map_entry(), and GC_invalidate_map().

#define mark_bit_from_hdr ( hhdr,
 ) 

Value:

(((hhdr)->hb_marks[divWORDSZ(n)] \
                            >> (modWORDSZ(n))) & 1)

Definition at line 676 of file gc_private.h.

Referenced by GC_check_heap_block(), GC_is_marked(), GC_reclaim_block(), GC_reclaim_clear(), GC_reclaim_uninit(), and remark_block().

#define MARK_BITS_PER_HBLK   (BITS_PER_HBLK/CPP_WORDSZ)

Definition at line 402 of file gc_private.h.

#define MARK_BITS_SZ   ((MARK_BITS_PER_HBLK + CPP_WORDSZ - 1)/CPP_WORDSZ)

Definition at line 411 of file gc_private.h.

Referenced by GC_block_empty(), and GC_clear_hdr_marks().

#define MAX_OFFSET   ((word)CPP_MAX_OFFSET)

Definition at line 554 of file gc_private.h.

Referenced by GC_add_map_entry(), and GC_register_displacement_inner().

#define MAXHINCR   512

Definition at line 160 of file gc_private.h.

Referenced by GC_expand_hp_inner().

#define MAXOBJKINDS   16

Definition at line 599 of file gc_private.h.

#define MAXOBJSZ   ((word)CPP_MAXOBJSZ)

Definition at line 380 of file gc_private.h.

Referenced by GC_add_map_entry(), GC_allochblk(), GC_base(), GC_free(), GC_gcollect_inner(), GC_init_size_map(), GC_realloc(), GC_reclaim_block(), GC_register_displacement_inner(), GC_start_reclaim(), remark_block(), setup_header(), Vallocate(), and Vallocwalk().

#define MERGE_SIZES

Definition at line 142 of file gc_private.h.

#define modHBLKSZ (  )     ((n) & (HBLKSIZE-1))

Definition at line 384 of file gc_private.h.

#define modWORDSZ (  )     ((n) & 0x1f)

Definition at line 346 of file gc_private.h.

Referenced by GC_is_black_listed(), and GC_mark().

#define MS_TIME_DIFF ( a,
 ) 

Value:

((unsigned long) \
                (1000.0*(double)((a)-(b))/(double)CLOCKS_PER_SEC))

Definition at line 195 of file gc_private.h.

Referenced by GC_gcollect_inner().

#define NON_GC_HINCR   ((word)8)

Definition at line 168 of file gc_private.h.

#define NORMAL   1

Definition at line 615 of file gc_private.h.

Referenced by GC_malloc(), and GC_reclaim_block().

#define OBJ_INVALID   0x7f

Definition at line 548 of file gc_private.h.

Referenced by GC_add_map_entry(), GC_invalidate_map(), and GC_mark().

#define obj_link (  )     (*(ptr_t *)(p))

Definition at line 474 of file gc_private.h.

Referenced by GC_free(), GC_gcollect_inner(), GC_generic_malloc(), GC_generic_malloc_words_small(), GC_malloc(), GC_malloc_atomic(), GC_new_hblk(), GC_reclaim_clear(), and GC_reclaim_uninit().

#define OFFSET_VALID ( displ   )     GC_valid_offsets[displ]

Definition at line 562 of file gc_private.h.

Referenced by GC_add_map_entry().

#define ONES   ((word)(-1))

Definition at line 359 of file gc_private.h.

#define PRINTBLACKLIST

Definition at line 105 of file gc_private.h.

#define PRINTBLOCKS

Definition at line 98 of file gc_private.h.

#define PRINTSTATS

Definition at line 92 of file gc_private.h.

#define PRINTTIMES

Definition at line 95 of file gc_private.h.

#define PTRFREE   0

Definition at line 614 of file gc_private.h.

Referenced by GC_allochblk(), GC_malloc_atomic(), and GC_reclaim_block().

#define set_mark_bit_from_hdr ( hhdr,
 ) 

Value:

(hhdr)->hb_marks[divWORDSZ(n)] \
                                |= 1 << modWORDSZ(n)

Definition at line 678 of file gc_private.h.

Referenced by GC_gcollect_inner(), and GC_set_mark_bit().

#define SIGNB   ((word)1 << (WORDSZ-1))

Definition at line 357 of file gc_private.h.

Referenced by GC_expand_hp_inner().

#define SILENT

Definition at line 1 of file gc_private.h.

 
#define START_WORLD (  ) 

Definition at line 314 of file gc_private.h.

Referenced by GC_gcollect_inner().

 
#define STOP_WORLD (  ) 

Definition at line 313 of file gc_private.h.

Referenced by GC_gcollect_inner().

#define TRUE   1

Definition at line 32 of file gc_private.h.

 
#define UNLOCK (  ) 

Definition at line 269 of file gc_private.h.

Referenced by GC_add_roots(), GC_call_with_alloc_lock(), GC_clear_roots(), GC_expand_hp(), GC_gcollect(), GC_generic_malloc(), GC_generic_malloc_words_small(), GC_register_disappearing_link(), GC_register_displacement(), GC_register_finalizer(), GC_store_debug_info(), GC_unregister_disappearing_link(), and run_one_test().

#define update_GC_hincr

Value:

Definition at line 647 of file gc_private.h.

Referenced by GC_collect_or_expand().

#define VALID_OFFSET_SZ

Value:

Definition at line 555 of file gc_private.h.

#define WARN (  )     GC_printf0(s)

Definition at line 334 of file gc_private.h.

Referenced by GC_collect_or_expand().

#define WORDS_TO_BYTES (  )     ((x)<<2)

Definition at line 343 of file gc_private.h.

Referenced by check_heap_stats(), GC_add_map_entry(), GC_allochblk(), GC_base(), GC_check_heap_block(), GC_clear_stack(), GC_expand_hp_inner(), GC_free(), GC_freehblk(), GC_gcollect_inner(), GC_init_size_map(), GC_realloc(), GC_reclaim_clear(), GC_reclaim_uninit(), GC_register_displacement_inner(), and GC_size().

#define WORDSZ   ((word)CPP_WORDSZ)

Definition at line 356 of file gc_private.h.

Referenced by GC_is_black_listed().


Typedef Documentation

typedef int bool

Definition at line 30 of file gc_private.h.

typedef char* extern_ptr_t

Definition at line 44 of file gc_private.h.

typedef mse*(* mark_proc)()

Definition at line 421 of file gc_private.h.

typedef struct ms_entry mse

typedef char* ptr_t

Definition at line 35 of file gc_private.h.


Function Documentation

void GC_add_map_entry (  ) 

Referenced by setup_header().

void GC_add_roots_inner (  ) 

Referenced by GC_add_roots(), GC_add_roots_inner(), GC_mark_roots(), and GC_register_data_segments().

void GC_add_to_black_list_normal (  ) 

void GC_add_to_black_list_stack (  ) 

void GC_add_to_heap (  ) 

struct hblk* GC_allochblk (  )  [read]

ptr_t GC_allocobj (  ) 

void GC_apply_to_all_blocks (  ) 

Referenced by clear_marks(), GC_check_heap(), GC_remark(), and GC_start_reclaim().

void GC_check_heap (  ) 

Definition at line 272 of file debug_malloc.c.

References GC_apply_to_all_blocks(), and GC_check_heap_block().

Referenced by GC_gcollect_inner().

void GC_clear_hdr_marks (  ) 

void GC_collect_or_expand (  ) 

void GC_continue_reclaim (  ) 

Referenced by GC_allocobj().

void GC_disable_signals (  ) 

Definition at line 84 of file os_dep.c.

References SIG_DEL, SIG_FILL, SIGSETMASK, and TRUE.

void GC_enable_signals (  ) 

Definition at line 109 of file os_dep.c.

References SIGSETMASK.

void GC_err_printf (  ) 

void GC_err_puts (  ) 

Referenced by GC_debug_malloc(), GC_debug_malloc_atomic(), GC_print_obj(), and GC_print_smashed_obj().

void GC_finalize (  ) 

Definition at line 219 of file finalize.c.

References ABORT, dl_head, finalizable_object::fo_client_data, finalizable_object::fo_fn, fo_head, finalizable_object::fo_hidden_base, finalizable_object::fo_next, finalizable_object::fo_object_size, GC_clear_mark_bit(), GC_is_marked(), GC_mark_all(), GC_set_mark_bit(), and TSIZE.

Referenced by GC_gcollect_inner().

hdr* GC_find_header (  ) 

void GC_freehblk (  ) 

bool GC_gcollect_inner (  ) 

ptr_t GC_generic_malloc (  ) 

Referenced by GC_generic_malloc(), GC_malloc(), GC_malloc_atomic(), and GC_realloc().

ptr_t GC_generic_malloc_words_small (  ) 

ptr_t GC_get_stack_base (  ) 

OS/2

Definition at line 155 of file os_dep.c.

References GC_noop(), and STACKBOTTOM_ALIGNMENT_M1.

void GC_init (  ) 

Definition at line 523 of file misc.c.

Referenced by main().

void GC_init_inner (  ) 

Definition at line 535 of file misc.c.

Referenced by GC_expand_hp(), GC_gcollect(), GC_generic_malloc(), and GC_generic_malloc_words_small().

void GC_install_counts (  ) 

Referenced by GC_allochblk().

void GC_install_header (  ) 

Referenced by GC_add_to_heap(), and GC_allochblk().

void GC_invalidate_map (  ) 

Referenced by GC_allochblk(), and GC_freehblk().

struct hblk* GC_is_black_listed (  )  [read]

void GC_mark (  ) 

Definition at line 96 of file mark.c.

References BYTES_TO_WORDS, divWORDSZ, GC_ADD_TO_BLACK_LIST_NORMAL, GC_greatest_plausible_heap_addr, GC_least_plausible_heap_addr, GC_mark_stack_size, hblkhdr::hb_sz, HBLKDISPL, HBLKPTR, HBLKSIZE, HDR, HDR_BYTES, IS_FORWARDING_ADDR_OR_NIL, MAP_ENTRY, map_entry_type, modWORDSZ, OBJ_INVALID, and SPLIT_RANGE_WORDS.

Referenced by GC_mark_reliable(), and remark_block().

void GC_mark_all (  ) 

Referenced by GC_finalize(), GC_mark_all_stack(), and GC_mark_roots().

void GC_mark_all_stack (  ) 

Referenced by GC_mark_regs(), GC_mark_roots(), and GC_tl_mark().

void GC_mark_init (  ) 

Definition at line 218 of file mark.c.

References alloc_mark_stack(), and INITIAL_MARK_STACK_SIZE.

void GC_mark_reliable (  ) 

Definition at line 225 of file mark.c.

References alloc_mark_stack(), dropped_some, FALSE, GC_mark(), GC_mark_stack_size, GC_printf1, and GC_remark().

Referenced by GC_mark_all().

void GC_new_hblk (  ) 

Referenced by GC_allocobj().

mse* GC_no_mark_proc (  ) 

mse* GC_normal_mark_proc (  ) 

void GC_print_obj (  ) 

void GC_printf (  ) 

void GC_promote_black_lists (  ) 

Definition at line 86 of file black_list.c.

References GC_clear_bl(), GC_incomplete_normal_bl, GC_incomplete_stack_bl, GC_new_normal_bl, GC_new_stack_bl, GC_old_normal_bl, and GC_old_stack_bl.

Referenced by GC_gcollect_inner().

void GC_register_data_segments (  ) 

Definition at line 318 of file os_dep.c.

References end, and GC_add_roots_inner().

void GC_register_displacement_inner (  ) 

Referenced by GC_register_displacement().

void GC_register_dynamic_libraries (  ) 

Definition at line 138 of file dynamic_load.c.

Referenced by GC_mark_roots().

void GC_remark (  ) 

Definition at line 357 of file mark.c.

References GC_apply_to_all_blocks(), and remark_block().

Referenced by GC_mark_reliable().

void GC_remove_counts (  ) 

Referenced by GC_freehblk().

void GC_remove_header (  ) 

Referenced by GC_freehblk().

ptr_t GC_scratch_alloc (  ) 

Referenced by alloc_hdr(), GC_add_map_entry(), GC_bl_init(), GC_invalidate_map(), GC_mark_all_stack(), GC_scratch_alloc(), and get_index().

void GC_start_reclaim (  ) 

Referenced by GC_gcollect_inner().

void GC_tl_mark (  ) 

Referenced by GC_mark_regs().

caddr_t sbrk (  ) 

Referenced by main().


Variable Documentation

struct _GC_arrays GC_arrays

Definition at line 31 of file misc.c.

bool GC_debugging_started

Definition at line 20 of file debug_malloc.c.

Referenced by GC_debug_malloc(), GC_debug_malloc_atomic(), and GC_gcollect_inner().

ptr_t GC_greatest_plausible_heap_addr

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

struct hblk* GC_hblkfreelist

Definition at line 35 of file allochblk.c.

word GC_hincr

Definition at line 45 of file misc.c.

Referenced by GC_collect_or_expand(), and GC_expand_hp_inner().

char* GC_invalid_map

Definition at line 22 of file obj_map.c.

Referenced by GC_apply_to_all_blocks(), GC_base(), and GC_invalidate_map().

bool GC_is_initialized

Definition at line 521 of file misc.c.

Referenced by GC_expand_hp(), GC_gcollect(), GC_generic_malloc(), and GC_generic_malloc_words_small().

ptr_t GC_least_plausible_heap_addr

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

int GC_n_kinds

Definition at line 47 of file misc.c.

Referenced by GC_gcollect_inner(), and GC_start_reclaim().

struct obj_kind GC_obj_kinds[MAXOBJKINDS]

Referenced by GC_allochblk(), GC_allocobj(), GC_continue_reclaim(), GC_gcollect_inner(), GC_new_hblk(), GC_reclaim_block(), GC_reclaim_small_nonempty_block(), GC_start_reclaim(), and setup_header().

word GC_root_size

Definition at line 75 of file mark_roots.c.

Referenced by GC_add_roots_inner(), GC_clear_roots(), and min_words_allocd().

ptr_t GC_stackbottom

Definition at line 43 of file misc.c.

Referenced by GC_clear_stack(), GC_mark_roots(), and min_words_allocd().


Generated on Fri Jan 25 10:39:49 2008 for russell by  doxygen 1.5.4