diff options
author | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-08-18 01:04:43 +0000 |
---|---|---|
committer | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-08-18 01:04:43 +0000 |
commit | 8fee6c5ba203062646a84ef04770c79ba2be0a6a (patch) | |
tree | 0a038d94cc4acd44c0926f011247f6b7969fa84b /boehm-gc/tests/test.c | |
parent | 75ae025532a15d2842c5401959ef6775e3ebe550 (diff) | |
download | gcc-8fee6c5ba203062646a84ef04770c79ba2be0a6a.tar.gz |
* Makefile.am, acinclude.m4, configure.in: Imported GC 6.0 and
merged local changes.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@44994 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'boehm-gc/tests/test.c')
-rw-r--r-- | boehm-gc/tests/test.c | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/boehm-gc/tests/test.c b/boehm-gc/tests/test.c index c7b537cba6c..1bd98d64e0f 100644 --- a/boehm-gc/tests/test.c +++ b/boehm-gc/tests/test.c @@ -14,6 +14,9 @@ */ /* An incomplete test for the garbage collector. */ /* Some more obscure entry points are not tested at all. */ +/* This must be compiled with the same flags used to build the */ +/* GC. It uses GC internals to allow more precise results */ +/* checking for some of the tests. */ # undef GC_BUILD @@ -238,8 +241,8 @@ sexpr y; #ifdef GC_GCJ_SUPPORT -#include "private/dbg_mlc.h" -#include "private/gc_pmark.h" +#include "gc_mark.h" +#include "private/dbg_mlc.h" /* For USR_PTR_FROM_BASE */ #include "gc_gcj.h" /* The following struct emulates the vtable in gcj. */ @@ -267,16 +270,12 @@ struct GC_ms_entry * fake_gcj_mark_proc(word * addr, addr = (word *)USR_PTR_FROM_BASE(addr); } x = (sexpr)(addr + 1); /* Skip the vtable pointer. */ - /* We could just call PUSH_CONTENTS directly here. But any real */ - /* real client would try to filter out the obvious misses. */ - if (0 != x -> sexpr_cdr) { - PUSH_CONTENTS((ptr_t)(x -> sexpr_cdr), mark_stack_ptr, - mark_stack_limit, &(x -> sexpr_cdr), exit1); - } - if ((ptr_t)(x -> sexpr_car) > (ptr_t) GC_least_plausible_heap_addr) { - PUSH_CONTENTS((ptr_t)(x -> sexpr_car), mark_stack_ptr, - mark_stack_limit, &(x -> sexpr_car), exit2); - } + mark_stack_ptr = GC_MARK_AND_PUSH( + (GC_PTR)(x -> sexpr_cdr), mark_stack_ptr, + mark_stack_limit, (GC_PTR *)&(x -> sexpr_cdr)); + mark_stack_ptr = GC_MARK_AND_PUSH( + (GC_PTR)(x -> sexpr_car), mark_stack_ptr, + mark_stack_limit, (GC_PTR *)&(x -> sexpr_car)); return(mark_stack_ptr); } @@ -703,6 +702,13 @@ int n; # endif collectable_count++; +# ifdef THREAD_LOCAL_ALLOC + /* Minimally exercise thread local allocation */ + { + char * result = (char *)GC_LOCAL_MALLOC_ATOMIC(17); + memset(result, 'a', 17); + } +# endif /* THREAD_LOCAL_ALLOC */ # if defined(MACOS) /* get around static data limitations. */ if (!live_indicators) |