extra finalization annotations

svn: r1201
This commit is contained in:
Matthew Flatt 2005-11-01 20:16:06 +00:00
parent a1002fc495
commit 0befe6c786

View File

@ -123,21 +123,35 @@ void gc_cleanup::install_cleanup(void)
# endif # endif
} }
#define SHOW_CLEANUP_TIMES 0
#if SHOW_CLEANUP_TIMES
extern "C" long scheme_get_process_milliseconds();
#endif
void GC_cleanup(void *obj, void *) void GC_cleanup(void *obj, void *)
{ {
gc *clean = (gc *)gcPTR_TO_OBJ(obj); gc *clean = (gc *)gcPTR_TO_OBJ(obj);
#ifdef MZ_PRECISE_GC #ifdef MZ_PRECISE_GC
# ifdef COMPACT_BACKTRACE_GC # ifdef COMPACT_BACKTRACE_GC
# if 0 # if SHOW_CLEANUP_TIMES
{ long start;
char *s; start = scheme_get_process_milliseconds();
s = clean->gcGetName(); char *s;
printf("CLeanup: %s\n", s ? s : "???"); s = clean->gcGetName();
} printf("Cleanup: %s\n", s ? s : "???");
# endif # endif
# endif # endif
GC_cpp_delete(clean); GC_cpp_delete(clean);
# ifdef COMPACT_BACKTRACE_GC
# if SHOW_CLEANUP_TIMES
start = scheme_get_process_milliseconds() - start;
printf(" done %d\n", start);
# endif
# endif
#else #else
clean->~gc(); clean->~gc();
#endif #endif