C:/Users/Dennis/src/lang/russell.orig/src/gc/debug_malloc.c File Reference

#include "gc_private.h"

Go to the source code of this file.

Data Structures

struct  oh
struct  closure

Defines

#define START_FLAG   ((word)0xfedcedcb)
#define END_FLAG   ((word)0xbcdecdef)
#define DEBUG_BYTES   (sizeof (oh) + sizeof (word))
#define ROUNDED_UP_WORDS(n)   BYTES_TO_WORDS((n) + WORDS_TO_BYTES(1) - 1)

Functions

bool GC_has_debug_info (ptr_t p)
ptr_t GC_store_debug_info (ptr_t p, word sz, char *string, word integer)
ptr_t GC_check_annotated_obj (oh *ohdr)
void GC_print_obj (ptr_t p)
void GC_print_smashed_obj (ptr_t p, ptr_t clobbered_addr)
extern_ptr_t GC_debug_malloc (size_t lb, char *s, int i)
extern_ptr_t GC_debug_malloc_atomic (size_t lb, char *s, int i)
void GC_debug_free (extern_ptr_t p)
extern_ptr_t GC_debug_realloc (extern_ptr_t p, size_t lb, char *s, int i)
void GC_check_heap_block (struct hblk *hbp, word dummy)
void GC_check_heap ()
extern_ptr_t GC_make_closure (GC_finalization_proc fn, extern_ptr_t data)
void GC_debug_invoke_finalizer (char *obj, char *data)

Variables

bool GC_debugging_started = FALSE


Define Documentation

#define DEBUG_BYTES   (sizeof (oh) + sizeof (word))

Definition at line 17 of file debug_malloc.c.

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

#define END_FLAG   ((word)0xbcdecdef)

Definition at line 3 of file debug_malloc.c.

Referenced by GC_check_annotated_obj(), GC_has_debug_info(), and GC_store_debug_info().

#define ROUNDED_UP_WORDS (  )     BYTES_TO_WORDS((n) + WORDS_TO_BYTES(1) - 1)

Definition at line 18 of file debug_malloc.c.

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

#define START_FLAG   ((word)0xfedcedcb)

Definition at line 2 of file debug_malloc.c.

Referenced by GC_check_annotated_obj(), GC_has_debug_info(), and GC_store_debug_info().


Function Documentation

ptr_t GC_check_annotated_obj ( oh ohdr  ) 

Definition at line 71 of file debug_malloc.c.

References BYTES_TO_WORDS, DEBUG_BYTES, END_FLAG, GC_size(), ROUNDED_UP_WORDS, and START_FLAG.

Referenced by GC_check_heap_block(), GC_debug_free(), and GC_debug_realloc().

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_check_heap_block ( struct hblk hbp,
word  dummy 
)

Definition at line 238 of file debug_malloc.c.

References GC_check_annotated_obj(), GC_err_printf0, GC_has_debug_info(), GC_print_smashed_obj(), hblkhdr::hb_sz, HBLKSIZE, HDR, HDR_WORDS, mark_bit_from_hdr, and WORDS_TO_BYTES.

Referenced by GC_check_heap().

void GC_debug_free ( extern_ptr_t  p  ) 

Definition at line 171 of file debug_malloc.c.

References ABORT, GC_base(), GC_check_annotated_obj(), GC_err_printf0, GC_err_printf1, GC_free(), and GC_print_smashed_obj().

void GC_debug_invoke_finalizer ( char *  obj,
char *  data 
)

Definition at line 301 of file debug_malloc.c.

References closure::cl_data, and closure::cl_fn.

extern_ptr_t GC_debug_malloc ( size_t  lb,
char *  s,
int  i 
)

Definition at line 122 of file debug_malloc.c.

References DEBUG_BYTES, GC_debugging_started, GC_err_printf1, GC_err_puts(), GC_malloc(), GC_register_displacement(), GC_store_debug_info(), and TRUE.

Referenced by GC_debug_realloc().

extern_ptr_t GC_debug_malloc_atomic ( size_t  lb,
char *  s,
int  i 
)

Definition at line 147 of file debug_malloc.c.

References DEBUG_BYTES, GC_debugging_started, GC_err_printf1, GC_err_puts(), GC_malloc_atomic(), GC_register_displacement(), GC_store_debug_info(), and TRUE.

extern_ptr_t GC_debug_realloc ( extern_ptr_t  p,
size_t  lb,
char *  s,
int  i 
)

Definition at line 200 of file debug_malloc.c.

References ABORT, bcopy, GC_base(), GC_check_annotated_obj(), GC_debug_malloc(), GC_err_printf0, GC_err_printf1, GC_print_smashed_obj(), and GC_realloc().

bool GC_has_debug_info ( ptr_t  p  ) 

Definition at line 25 of file debug_malloc.c.

References BYTES_TO_WORDS, END_FLAG, FALSE, GC_size(), HBLKPTR, START_FLAG, and TRUE.

Referenced by GC_check_heap_block().

extern_ptr_t GC_make_closure ( GC_finalization_proc  fn,
extern_ptr_t  data 
)

Definition at line 285 of file debug_malloc.c.

References closure::cl_data, closure::cl_fn, and GC_malloc().

void GC_print_obj ( ptr_t  p  ) 

Definition at line 92 of file debug_malloc.c.

References GC_base(), GC_err_printf1, GC_err_printf2, and GC_err_puts().

void GC_print_smashed_obj ( ptr_t  p,
ptr_t  clobbered_addr 
)

Definition at line 102 of file debug_malloc.c.

References BYTES_TO_WORDS, GC_base(), GC_err_printf1, GC_err_printf2, GC_err_puts(), and GC_size().

Referenced by GC_check_heap_block(), GC_debug_free(), and GC_debug_realloc().

ptr_t GC_store_debug_info ( ptr_t  p,
word  sz,
char *  string,
word  integer 
)

Definition at line 45 of file debug_malloc.c.

References BYTES_TO_WORDS, DCL_LOCK_STATE, END_FLAG, GC_size(), LOCK, ROUNDED_UP_WORDS, START_FLAG, and UNLOCK.

Referenced by GC_debug_malloc(), and GC_debug_malloc_atomic().


Variable Documentation

bool GC_debugging_started = FALSE

Definition at line 20 of file debug_malloc.c.

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


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