aboutsummaryrefslogtreecommitdiff
path: root/boehm-gc
diff options
context:
space:
mode:
authorBryce McKinlay <bryce@gcc.gnu.org>2000-05-07 00:59:01 +0100
committerBryce McKinlay <bryce@gcc.gnu.org>2000-05-07 00:59:01 +0100
commit179977c13abc237a74de8ff8db74ff892186c68e (patch)
treebf63ddd6f851df65a31a370541fbdecfd301b4bc /boehm-gc
parent5a3c491c8e9ec258ff37a58de522b6f535ea4ade (diff)
downloadgcc-179977c13abc237a74de8ff8db74ff892186c68e.zip
gcc-179977c13abc237a74de8ff8db74ff892186c68e.tar.gz
gcc-179977c13abc237a74de8ff8db74ff892186c68e.tar.bz2
This commit was generated by cvs2svn to compensate for changes in r33746,
which included commits to RCS files with non-trunk default branches. From-SVN: r33747
Diffstat (limited to 'boehm-gc')
-rw-r--r--boehm-gc/gcj_mlc.c4
-rw-r--r--boehm-gc/include/gc_cpp.h10
-rw-r--r--boehm-gc/include/private/gc_priv.h2
-rw-r--r--boehm-gc/include/private/gcconfig.h13
4 files changed, 21 insertions, 8 deletions
diff --git a/boehm-gc/gcj_mlc.c b/boehm-gc/gcj_mlc.c
index ba51cbe..eb67eac 100644
--- a/boehm-gc/gcj_mlc.c
+++ b/boehm-gc/gcj_mlc.c
@@ -282,4 +282,8 @@ DCL_LOCK_STATE;
return((GC_PTR) op);
}
+#else
+
+char GC_no_gcj_support;
+
#endif /* GC_GCJ_SUPPORT */
diff --git a/boehm-gc/include/gc_cpp.h b/boehm-gc/include/gc_cpp.h
index 36013e1..35686fc 100644
--- a/boehm-gc/include/gc_cpp.h
+++ b/boehm-gc/include/gc_cpp.h
@@ -255,12 +255,12 @@ inline gc_cleanup::gc_cleanup() {
GC_finalization_proc oldProc;
void* oldData;
void* base = GC_base( (void *) this );
- if (0 == base) return;
- GC_REGISTER_FINALIZER_IGNORE_SELF(
- base, cleanup, (void*) ((char*) this - (char*) base),
+ if (0 != base) {
+ GC_REGISTER_FINALIZER_IGNORE_SELF(
+ base, (GC_finalization_proc)cleanup, (void*) ((char*) this - (char*) base),
&oldProc, &oldData );
- if (0 != oldProc) {
- GC_REGISTER_FINALIZER_IGNORE_SELF( base, oldProc, oldData, 0, 0 );}}
+ if (0 != oldProc) {
+ GC_REGISTER_FINALIZER_IGNORE_SELF( base, oldProc, oldData, 0, 0 );}}}
inline void* operator new(
size_t size,
diff --git a/boehm-gc/include/private/gc_priv.h b/boehm-gc/include/private/gc_priv.h
index eabb85f..ce68587 100644
--- a/boehm-gc/include/private/gc_priv.h
+++ b/boehm-gc/include/private/gc_priv.h
@@ -1405,7 +1405,7 @@ extern GC_bool GC_objects_are_marked; /* There are marked objects in */
extern GC_bool GC_incremental;
/* Using incremental/generational collection. */
#else
-# define GC_incremental TRUE
+# define GC_incremental FALSE
/* Hopefully allow optimizer to remove some code. */
#endif
diff --git a/boehm-gc/include/private/gcconfig.h b/boehm-gc/include/private/gcconfig.h
index 4c4bca3..045617a 100644
--- a/boehm-gc/include/private/gcconfig.h
+++ b/boehm-gc/include/private/gcconfig.h
@@ -386,6 +386,11 @@
* to the nearest plausible page boundary, and use that instead
* of STACKBOTTOM.
*
+ * Gustavo Rodriguez-Rivera points out that on most (all?) Unix machines,
+ * the value of environ is a pointer that can serve as STACKBOTTOM.
+ * I expect that HEURISTIC2 can be replaced by this approach, which
+ * interferes far less with debugging.
+ *
* If no expression for STACKBOTTOM can be found, and neither of the above
* heuristics are usable, the collector can still be used with all of the above
* undefined, provided one of the following is done:
@@ -553,6 +558,7 @@
/* This was 2, but that didn't sound right. */
# define OS_TYPE "LINUX"
# define HEURISTIC1
+# define DYNAMIC_LOADING
# undef STACK_GRAN
# define STACK_GRAN 0x10000000
/* Stack usually starts at 0x80000000 */
@@ -990,7 +996,11 @@
/* this.) */
# define STACKBOTTOM ((ptr_t) 0x7b033000) /* from /etc/conf/h/param.h */
# else
-# define HEURISTIC2
+ /* Gustavo Rodriguez-Rivera suggested changing HEURISTIC2 */
+ /* to this. We'll probably do this on other platforms, too. */
+ /* For now I'll use it where I can test it. */
+ extern char ** environ;
+# define STACKBOTTOM ((ptr_t)environ)
# endif
# define STACK_GROWS_UP
# define DYNAMIC_LOADING
@@ -1076,7 +1086,6 @@
/* Requires Linux 2.3.47 or later. */
extern int _end;
# define DATAEND (&_end)
- /* PREFETCH appears to have a large performance impact. */
# define PREFETCH(x) \
__asm__ (" lfetch [%0]": : "r"((void *)(x)))
# define PREFETCH_FOR_WRITE(x) \