This is the mail archive of the
java-patches@sources.redhat.com
mailing list for the Java project.
boehm-gc temporary fix
- To: Java Patch List <java-patches at sourceware dot cygnus dot com>
- Subject: boehm-gc temporary fix
- From: Tom Tromey <tromey at cygnus dot com>
- Date: 02 Aug 2000 13:56:52 -0600
- Reply-To: tromey at cygnus dot com
I'm checking in this temporary fix to the Boehm GC.
It adds prototypes for the few functions that we need.
This lets us compile with the latest g++.
This change will be erased by the next GC import.
2000-08-02 Tom Tromey <tromey@cygnus.com>
* gc_priv.h (GC_generic_malloc_inner): Prototype.
(GC_generic_malloc): Likewise.
(GC_add_to_black_list_normal): Likewise.
(GC_find_header): Likewise.
(GC_ADD_TO_BLACK_LIST_NORMAL): Cast bits argument to word.
* gc_mark.h (GC_find_start): Prototype.
(GC_signal_mark_stack_overflow): Likewise.
Tom
Index: gc_mark.h
===================================================================
RCS file: /cvs/java/libgcj/boehm-gc/gc_mark.h,v
retrieving revision 1.4
diff -u -r1.4 gc_mark.h
--- gc_mark.h 2000/04/19 10:09:57 1.4
+++ gc_mark.h 2000/08/02 19:44:26
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1991-1994 by Xerox Corporation. All rights reserved.
+ * Copyright (c) 1991-1994, 2000 by Xerox Corporation. All rights reserved.
*
* THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
* OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
@@ -117,9 +117,13 @@
extern mse * GC_mark_stack;
-ptr_t GC_find_start();
+#ifdef PRINT_BLACK_LIST
+ptr_t GC_find_start(ptr_t, hdr*, word);
+#else
+ptr_t GC_find_start(ptr_t, hdr*);
+#endif
-mse * GC_signal_mark_stack_overflow();
+mse * GC_signal_mark_stack_overflow(mse *);
# ifdef GATHERSTATS
# define ADD_TO_ATOMIC(sz) GC_atomic_in_use += (sz)
Index: gc_priv.h
===================================================================
RCS file: /cvs/java/libgcj/boehm-gc/gc_priv.h,v
retrieving revision 1.12
diff -u -r1.12 gc_priv.h
--- gc_priv.h 2000/05/07 00:43:49 1.12
+++ gc_priv.h 2000/08/02 19:44:28
@@ -1597,23 +1597,23 @@
/* Black listing: */
void GC_bl_init();
# ifndef ALL_INTERIOR_POINTERS
- void GC_add_to_black_list_normal(/* bits, maybe source */);
+ void GC_add_to_black_list_normal(word /* bits, maybe source */);
/* Register bits as a possible future false */
/* reference from the heap or static data */
# ifdef PRINT_BLACK_LIST
# define GC_ADD_TO_BLACK_LIST_NORMAL(bits, source) \
- GC_add_to_black_list_normal(bits, source)
+ GC_add_to_black_list_normal((word) bits, source)
# else
# define GC_ADD_TO_BLACK_LIST_NORMAL(bits, source) \
- GC_add_to_black_list_normal(bits)
+ GC_add_to_black_list_normal((word) bits)
# endif
# else
# ifdef PRINT_BLACK_LIST
# define GC_ADD_TO_BLACK_LIST_NORMAL(bits, source) \
- GC_add_to_black_list_stack(bits, source)
+ GC_add_to_black_list_stack((word) bits, source)
# else
# define GC_ADD_TO_BLACK_LIST_NORMAL(bits, source) \
- GC_add_to_black_list_stack(bits)
+ GC_add_to_black_list_stack((word) bits)
# endif
# endif
@@ -1713,7 +1713,7 @@
/* collection work, if appropriate. */
/* A unit is an amount appropriate for */
/* HBLKSIZE bytes of allocation. */
-ptr_t GC_generic_malloc(/* bytes, kind */);
+ptr_t GC_generic_malloc(word bytes, int kind);
/* Allocate an object of the given */
/* kind. By default, there are only */
/* a few kinds: composite(pointerfree), */
@@ -1727,7 +1727,7 @@
/* As above, but pointers past the */
/* first page of the resulting object */
/* are ignored. */
-ptr_t GC_generic_malloc_inner(/* bytes, kind */);
+ptr_t GC_generic_malloc_inner(word bytes, int kind);
/* Ditto, but I already hold lock, etc. */
ptr_t GC_generic_malloc_words_small GC_PROTO((size_t words, int kind));
/* As above, but size in units of words */
@@ -1757,7 +1757,7 @@
/* Remove the header for block h. */
void GC_remove_counts(/*h, sz*/);
/* Remove forwarding counts for h. */
-hdr * GC_find_header(/*p*/); /* Debugging only. */
+hdr * GC_find_header(ptr_t /*p*/); /* Debugging only. */
void GC_finalize(); /* Perform all indicated finalization actions */
/* on unmarked objects. */