summaryrefslogtreecommitdiff
path: root/dbg_mlc.c
diff options
context:
space:
mode:
authorivmai <ivmai>2011-04-09 12:50:54 +0200
committerIvan Maidanski <ivmai@mail.ru>2011-07-26 19:06:57 +0200
commit00ee2f7451eed8bd1cceda8001df1722067c9f17 (patch)
tree59f3abf96c4cd02aee4cfb9475c22407a73f5eaa /dbg_mlc.c
parentbe457cfd5dde0cc1a1db497a70c15b7bd38153b8 (diff)
2011-04-09 Ivan Maidanski <ivmai@mail.ru>
* dbg_mlc.c (GC_register_finalizer_no_order): Remove redundant declaration. * dbg_mlc.c (GC_debug_malloc_replacement, GC_debug_realloc_replacement): Rename RA to GC_DBG_RA. * malloc.c (GC_debug_malloc_replacement): Ditto. * mallocx.c (GC_debug_realloc_replacement): Ditto. * dbg_mlc.c (GC_store_debug_info): Move proto from dbg_mlc.h. * malloc.c (GC_strdup, GC_strndup, GC_wcsdup): Move to mallocx.c. * malloc.c: Include errno.h only REDIRECT_MALLOC; remove redundant includes of string.h. * mallocx.c: Include string.h (for GC_strdup). * include/private/dbg_mlc.h (GC_store_debug_info): Move declaration to dbg_mlc.c. * include/private/gc_locks.h (UNCOND_LOCK, UNCOND_UNLOCK): Remove redundant trailing ';'. * include/private/gc_priv.h (START_WORLD, COND_DUMP): Ditto. * include/private/gc_locks.h (LOCK, UNLOCK): Place opening '{' properly. * include/private/gc_priv.h (GC_DBG_RA): Move from dbg_mlc.c, malloc.c, mallocx.c.
Diffstat (limited to 'dbg_mlc.c')
-rw-r--r--dbg_mlc.c36
1 files changed, 13 insertions, 23 deletions
diff --git a/dbg_mlc.c b/dbg_mlc.c
index bc14d08..feaf51a 100644
--- a/dbg_mlc.c
+++ b/dbg_mlc.c
@@ -24,10 +24,6 @@
GC_INNER void GC_default_print_heap_obj_proc(ptr_t p);
-GC_API void GC_CALL GC_register_finalizer_no_order(void * obj,
- GC_finalization_proc fn, void * cd,
- GC_finalization_proc *ofn, void * *ocd);
-
#ifndef SHORT_DBG_HDRS
/* Check whether object with base pointer p has debugging info */
/* p is assumed to point to a legitimate object in our part */
@@ -58,7 +54,7 @@ GC_API void GC_CALL GC_register_finalizer_no_order(void * obj,
}
return(FALSE);
}
-#endif
+#endif /* !SHORT_DBG_HDRS */
#ifdef KEEP_BACK_PTRS
@@ -459,16 +455,16 @@ STATIC void GC_debug_print_heap_obj_proc(ptr_t p)
GC_INNER void GC_start_debugging(void)
{
-# ifndef SHORT_DBG_HDRS
- GC_check_heap = GC_check_heap_proc;
- GC_print_all_smashed = GC_print_all_smashed_proc;
-# else
- GC_check_heap = GC_do_nothing;
- GC_print_all_smashed = GC_do_nothing;
-# endif
- GC_print_heap_obj = GC_debug_print_heap_obj_proc;
- GC_debugging_started = TRUE;
- GC_register_displacement((word)sizeof(oh));
+# ifndef SHORT_DBG_HDRS
+ GC_check_heap = GC_check_heap_proc;
+ GC_print_all_smashed = GC_print_all_smashed_proc;
+# else
+ GC_check_heap = GC_do_nothing;
+ GC_print_all_smashed = GC_do_nothing;
+# endif
+ GC_print_heap_obj = GC_debug_print_heap_obj_proc;
+ GC_debugging_started = TRUE;
+ GC_register_displacement((word)sizeof(oh));
}
size_t GC_debug_header_size = sizeof(oh);
@@ -1165,18 +1161,12 @@ GC_API void GC_CALL GC_debug_register_finalizer_ignore_self
store_old(obj, my_old_fn, (struct closure *)my_old_cd, ofn, ocd);
}
-#ifdef GC_ADD_CALLER
-# define RA GC_RETURN_ADDR,
-#else
-# define RA
-#endif
-
GC_API void * GC_CALL GC_debug_malloc_replacement(size_t lb)
{
- return GC_debug_malloc(lb, RA "unknown", 0);
+ return GC_debug_malloc(lb, GC_DBG_RA "unknown", 0);
}
GC_API void * GC_CALL GC_debug_realloc_replacement(void *p, size_t lb)
{
- return GC_debug_realloc(p, lb, RA "unknown", 0);
+ return GC_debug_realloc(p, lb, GC_DBG_RA "unknown", 0);
}