mirror of git://gcc.gnu.org/git/gcc.git
boehm.cc: Include gc_local_alloc.h if appropriate.
2001-08-17 Hans-J. Boehm <Hans_Boehm@hp.com> * boehm.cc: Include gc_local_alloc.h if appropriate. (GC_GENERIC_MALLOC): Don't define. (MAYBE_MARK): Redefine for GC 6.0. (_Jv_MarkObj): Mark class differently. (_Jv_AllocArray): Use GC_generic_malloc. From-SVN: r44993
This commit is contained in:
parent
c8af3574e3
commit
eed5666980
|
@ -1,3 +1,11 @@
|
||||||
|
2001-08-17 Hans-J. Boehm <Hans_Boehm@hp.com>
|
||||||
|
|
||||||
|
* boehm.cc: Include gc_local_alloc.h if appropriate.
|
||||||
|
(GC_GENERIC_MALLOC): Don't define.
|
||||||
|
(MAYBE_MARK): Redefine for GC 6.0.
|
||||||
|
(_Jv_MarkObj): Mark class differently.
|
||||||
|
(_Jv_AllocArray): Use GC_generic_malloc.
|
||||||
|
|
||||||
2001-08-17 Mark J Roberts <mjr@anarcast.net>
|
2001-08-17 Mark J Roberts <mjr@anarcast.net>
|
||||||
|
|
||||||
* java/math/BigInteger.java (randBytes): New method.
|
* java/math/BigInteger.java (randBytes): New method.
|
||||||
|
|
|
@ -30,24 +30,19 @@ extern "C"
|
||||||
#include <private/gc_pmark.h>
|
#include <private/gc_pmark.h>
|
||||||
#include <gc_gcj.h>
|
#include <gc_gcj.h>
|
||||||
|
|
||||||
|
#ifdef THREAD_LOCAL_ALLOC
|
||||||
|
# define GC_REDIRECT_TO_LOCAL
|
||||||
|
# include <gc_local_alloc.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
// These aren't declared in any Boehm GC header.
|
// These aren't declared in any Boehm GC header.
|
||||||
void GC_finalize_all (void);
|
void GC_finalize_all (void);
|
||||||
ptr_t GC_debug_generic_malloc (size_t size, int k, GC_EXTRA_PARAMS);
|
ptr_t GC_debug_generic_malloc (size_t size, int k, GC_EXTRA_PARAMS);
|
||||||
};
|
};
|
||||||
|
|
||||||
// FIXME: this should probably be defined in some GC header.
|
|
||||||
#ifdef GC_DEBUG
|
|
||||||
# define GC_GENERIC_MALLOC(Size, Type) \
|
|
||||||
GC_debug_generic_malloc (Size, Type, GC_EXTRAS)
|
|
||||||
#else
|
|
||||||
# define GC_GENERIC_MALLOC(Size, Type) GC_generic_malloc (Size, Type)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// We must check for plausibility ourselves.
|
// We must check for plausibility ourselves.
|
||||||
#define MAYBE_MARK(Obj, Top, Limit, Source, Exit) \
|
#define MAYBE_MARK(Obj, Top, Limit, Source, Exit) \
|
||||||
if ((ptr_t) (Obj) >= GC_least_plausible_heap_addr \
|
Top=GC_MARK_AND_PUSH((GC_PTR)Obj, Top, Limit, (GC_PTR *)Source)
|
||||||
&& (ptr_t) (Obj) <= GC_greatest_plausible_heap_addr) \
|
|
||||||
PUSH_CONTENTS (Obj, Top, Limit, Source, Exit)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -312,7 +307,7 @@ _Jv_MarkArray (void *addr, void *msp, void *msl, void * /*env*/)
|
||||||
# endif
|
# endif
|
||||||
// Mark the object's class.
|
// Mark the object's class.
|
||||||
p = (ptr_t) klass;
|
p = (ptr_t) klass;
|
||||||
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, obj, o2label);
|
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, &(dt -> clas), o2label);
|
||||||
|
|
||||||
for (int i = 0; i < JvGetArrayLength (array); ++i)
|
for (int i = 0; i < JvGetArrayLength (array); ++i)
|
||||||
{
|
{
|
||||||
|
@ -374,7 +369,7 @@ _Jv_AllocArray (jsize size, jclass klass)
|
||||||
if (size < min_heap_addr)
|
if (size < min_heap_addr)
|
||||||
obj = GC_MALLOC(size);
|
obj = GC_MALLOC(size);
|
||||||
else
|
else
|
||||||
obj = GC_GENERIC_MALLOC (size, array_kind_x);
|
obj = GC_generic_malloc (size, array_kind_x);
|
||||||
#endif
|
#endif
|
||||||
*((_Jv_VTable **) obj) = klass->vtable;
|
*((_Jv_VTable **) obj) = klass->vtable;
|
||||||
return obj;
|
return obj;
|
||||||
|
|
Loading…
Reference in New Issue