* src/mm/boehm.h: Renamed to gc-common.h
authormichi <none@none>
Sat, 4 Nov 2006 17:30:44 +0000 (17:30 +0000)
committermichi <none@none>
Sat, 4 Nov 2006 17:30:44 +0000 (17:30 +0000)
* src/mm/gc-common.h: Added.

* src/vm/builtin.c, src/vm/jit/mips/linux/md-os.c,
src/vm/jit/mips/irix/md-os.c, src/vm/jit/stacktrace.c, src/vm/vm.c,
src/native/tool/gennativetable.c, src/native/jni.c,
src/native/vm/gnu_java_lang_management_VMThreadMXBeanImpl.c,
src/native/vm/gnu_java_lang_management_VMMemoryMXBeanImpl.c,
src/native/vm/java_lang_VMObject.c, src/native/vm/java_lang_VMRuntime.c,
src/native/vm/gnu_java_lang_management_VMClassLoadingMXBeanImpl.c,
src/native/jvmti/jvmti.c, src/mm/nogc.c, src/mm/boehm.c, src/mm/memory.h,
src/threads/native/threads.c, src/cacaoh/headers.c, src/cacaoh/cacaoh.c:
Changed include from "mm/boehm.h" to "mm/gc-common.h"

* src/mm/Makefile.am: Added subdir and lib for cacao-gc

* src/mm/cacao-gc: Added.
* src/mm/cacao-gc/gc.c: Added.
* src/mm/cacao-gc/Makefile.am: Added.
* src/mm/cacao-gc/.cvsignore: Added.

* src/threads/native/threads.c: Fixed include of boehms gc.h

* src/vm/jit/mips/linux/md-os.c (md_init) [ENABLE_GC_BOEHM]: Added ifdef
for boehm specific call.
* src/vm/jit/mips/irix/md-os.c: Likewise.
* src/vm/signal.c: Likewise.

* configure.ac: Adapted buildsystem for new GC. Added cacao-gc.

--HG--
rename : src/mm/boehm.h => src/mm/gc-common.h

27 files changed:
configure.ac
src/cacaoh/cacaoh.c
src/cacaoh/headers.c
src/mm/Makefile.am
src/mm/boehm.c
src/mm/boehm.h [deleted file]
src/mm/cacao-gc/.cvsignore [new file with mode: 0644]
src/mm/cacao-gc/Makefile.am [new file with mode: 0644]
src/mm/cacao-gc/gc.c [new file with mode: 0644]
src/mm/gc-common.h [new file with mode: 0644]
src/mm/memory.h
src/mm/nogc.c
src/native/jni.c
src/native/jvmti/jvmti.c
src/native/tools/gennativetable.c
src/native/vm/gnu_java_lang_management_VMClassLoadingMXBeanImpl.c
src/native/vm/gnu_java_lang_management_VMMemoryMXBeanImpl.c
src/native/vm/gnu_java_lang_management_VMThreadMXBeanImpl.c
src/native/vm/java_lang_VMObject.c
src/native/vm/java_lang_VMRuntime.c
src/threads/native/threads.c
src/vm/builtin.c
src/vm/jit/mips/irix/md-os.c
src/vm/jit/mips/linux/md-os.c
src/vm/jit/stacktrace.c
src/vm/signal.c
src/vm/vm.c

index 4252960554addb2e2045162ce0d88671177ffafc..17c72398d38079706dc6c7cf4a3669f1834d82fb 100644 (file)
@@ -303,18 +303,35 @@ fi
 
 
 dnl check for garbage collector usage
-AC_MSG_CHECKING(whether GC should be disabled)
-AC_ARG_ENABLE([gc],
-              [AS_HELP_STRING(--disable-gc,disable garbage collector (for debugging only!) [[default=yes]])],
-              [case "${enableval}" in
-                   no) DISABLE_GC=yes
-                       AC_DEFINE([DISABLE_GC], 1, [disable garbage collector])
-                       ;;
-                   *) DISABLE_GC=no;;
-               esac],
-              [DISABLE_GC=no])
-AC_MSG_RESULT(${DISABLE_GC})
-AM_CONDITIONAL([DISABLE_GC], test x"${DISABLE_GC}" = "xyes")
+AC_ARG_ENABLE([gc], [AS_HELP_STRING(--enable-gc,enable garbage collector support (none,boehm,cacao) [[default=boehm]])])
+AC_MSG_CHECKING(whether GC should be enabled)
+enable_gc=${enable_gc:-boehm}
+case "$enable_gc" in
+no | none)
+    AC_DEFINE([DISABLE_GC], 1, [disable garbage collector])
+    ENABLE_GC=none
+    AC_MSG_RESULT(no)
+    ;;
+
+boehm)
+    AC_DEFINE([ENABLE_GC_BOEHM], 1, [enable conservative boehm-gc])
+    ENABLE_GC=boehm
+    AC_MSG_RESULT(yes, boehm-gc)
+    ;;
+
+cacao)
+    AC_DEFINE([ENABLE_GC_CACAO], 1, [enable exact cacao-gc])
+    ENABLE_GC=cacao
+    AC_MSG_RESULT(yes, cacao-gc)
+    ;;
+
+*)
+    AC_MSG_ERROR($enable_gc is an unknown garbage collector package)
+    ;;
+esac
+AM_CONDITIONAL([DISABLE_GC], test x"${ENABLE_GC}" = "xnone")
+AM_CONDITIONAL([ENABLE_GC_BOEHM], test x"${ENABLE_GC}" = "xboehm")
+AM_CONDITIONAL([ENABLE_GC_CACAO], test x"${ENABLE_GC}" = "xcacao")
 
 
 dnl check for dump memory usage
@@ -857,6 +874,7 @@ AC_CONFIG_FILES([Makefile]
                [src/fdlibm/Makefile]
                [src/lib/Makefile]
                [src/mm/Makefile]
+               [src/mm/cacao-gc/Makefile]
                [src/native/Makefile]
                [src/native/include/Makefile]
                [src/native/jvmti/Makefile]
index 21fd436e8d5685c1be669524b9e5bab48e3024eb..7c3321e99103ac8dfafe6f16680b0a59d9aa9efd 100644 (file)
@@ -30,7 +30,7 @@
             Philipp Tomsich
             Christian Thalinger
 
-   $Id: cacaoh.c 5809 2006-10-20 13:09:54Z twisti $
+   $Id: cacaoh.c 5900 2006-11-04 17:30:44Z michi $
 
 */
 
@@ -44,7 +44,7 @@
 #include "vm/types.h"
 
 #include "cacaoh/headers.h"
-#include "mm/boehm.h"
+#include "mm/gc-common.h"
 #include "mm/memory.h"
 #include "native/include/java_lang_Throwable.h"
 
index d02c5376a08e95077b4084b71e1cd0749aa59827..32ba606dd158aded33da4181d8be515f04343ce3 100644 (file)
@@ -31,7 +31,7 @@
             Christian Thalinger
                        Edwin Steiner
 
-   $Id: headers.c 5868 2006-10-30 11:21:36Z edwin $
+   $Id: headers.c 5900 2006-11-04 17:30:44Z michi $
 
 */
 
@@ -53,7 +53,7 @@
 # include <ucontext.h>
 #endif
 
-#include "mm/boehm.h"
+#include "mm/gc-common.h"
 #include "mm/memory.h"
 #include "native/include/java_lang_String.h"
 #include "native/include/java_lang_Throwable.h"
index ac7c5d20fc73d5fc62209105ed923f69d790e907..8ef863bb26602046df61e2f37c444f9b374e17d7 100644 (file)
@@ -28,7 +28,7 @@
 ##
 ## Changes:
 ##
-## $Id: Makefile.am 5884 2006-10-31 20:11:28Z twisti $
+## $Id: Makefile.am 5900 2006-11-04 17:30:44Z michi $
 
 ## Process this file with automake to produce Makefile.in
 
@@ -37,12 +37,15 @@ AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/vm/jit/$(ARCH_DIR) -I$(top
 LIBS =
 
 DIST_SUBDIRS = \
-       boehm-gc
+       boehm-gc \
+       cacao-gc
 
 if DISABLE_GC
 GC_FILE = \
        nogc.c
-else
+endif
+
+if ENABLE_GC_BOEHM
 SUBDIRS = \
        boehm-gc
 
@@ -53,12 +56,20 @@ GC_LIB = \
        $(top_builddir)/src/mm/boehm-gc/libgc.la
 endif
 
+if ENABLE_GC_CACAO
+SUBDIRS = \
+       cacao-gc
+
+GC_LIB = \
+       $(top_builddir)/src/mm/cacao-gc/libgc.la
+endif
+
 noinst_LTLIBRARIES = \
        libmm.la
 
 libmm_la_SOURCES = \
        $(GC_FILE) \
-       boehm.h \
+       gc-common.h \
        memory.c \
        memory.h
 
index b7e7bfe2762cfe350c937b0b73ea56e50e41396e..00212400eaeaf192e46f3e0a4277ff9158eccbf2 100644 (file)
@@ -28,7 +28,7 @@
 
    Changes: Christian Thalinger
 
-   $Id: boehm.c 5189 2006-07-31 12:25:09Z twisti $
+   $Id: boehm.c 5900 2006-11-04 17:30:44Z michi $
 
 */
 
@@ -44,7 +44,7 @@
 #endif
 
 #include "boehm-gc/include/gc.h"
-#include "mm/boehm.h"
+#include "mm/gc-common.h"
 #include "mm/memory.h"
 
 #if defined(ENABLE_THREADS)
diff --git a/src/mm/boehm.h b/src/mm/boehm.h
deleted file mode 100644 (file)
index 706a51a..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-/* src/mm/boehm.h - interface for boehm gc header
-
-   Copyright (C) 1996-2005, 2006 R. Grafl, A. Krall, C. Kruegel,
-   C. Oates, R. Obermaisser, M. Platter, M. Probst, S. Ring,
-   E. Steiner, C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich,
-   J. Wenninger, Institut f. Computersprachen - TU Wien
-
-   This file is part of CACAO.
-
-   This program is free software; you can redistribute it and/or
-   modify it under the terms of the GNU General Public License as
-   published by the Free Software Foundation; either version 2, or (at
-   your option) any later version.
-
-   This program is distributed in the hope that it will be useful, but
-   WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-   02110-1301, USA.
-
-   Contact: cacao@cacaojvm.org
-
-   Authors: Christian Thalinger
-
-   Changes:
-
-   $Id: boehm.h 5189 2006-07-31 12:25:09Z twisti $
-
-*/
-
-
-#ifndef _BOEHM_H
-#define _BOEHM_H
-
-#include "config.h"
-#include "vm/types.h"
-
-#include "vm/method.h"
-
-
-/* function prototypes ********************************************************/
-
-void  gc_init(u4 heapmaxsize, u4 heapstartsize);
-
-void *heap_alloc_uncollectable(u4 bytelength);
-void *heap_allocate(u4 bytelength, u4 references, methodinfo *finalizer);
-void  heap_free(void *p);
-
-void  gc_call(void);
-s8    gc_get_heap_size(void);
-s8    gc_get_free_bytes(void);
-s8    gc_get_total_bytes(void);
-s8    gc_get_max_heap_size(void);
-void  gc_invoke_finalizers(void);
-void  gc_finalize_all(void);
-void *gc_out_of_memory(size_t bytes_requested);
-
-#if defined(DISABLE_GC)
-void  nogc_init(u4 heapmaxsize, u4 heapstartsize);
-void *nogc_realloc(void *src, s4 len1, s4 len2);
-#endif
-
-#endif /* _BOEHM_H */
-
-
-/*
- * These are local overrides for various environment variables in Emacs.
- * Please do not remove this and leave it at the end of the file, where
- * Emacs will automagically detect them.
- * ---------------------------------------------------------------------
- * Local variables:
- * mode: c
- * indent-tabs-mode: t
- * c-basic-offset: 4
- * tab-width: 4
- * End:
- */
diff --git a/src/mm/cacao-gc/.cvsignore b/src/mm/cacao-gc/.cvsignore
new file mode 100644 (file)
index 0000000..8f719f9
--- /dev/null
@@ -0,0 +1,9 @@
+*.a
+*.o
+*.la
+*.lo
+.deps
+.libs
+Makefile
+Makefile.in
+TAGS
diff --git a/src/mm/cacao-gc/Makefile.am b/src/mm/cacao-gc/Makefile.am
new file mode 100644 (file)
index 0000000..8f41eb3
--- /dev/null
@@ -0,0 +1,53 @@
+## src/mm/cacao-gc/Makefile.am
+##
+## Copyright (C) 1996-2005, 2006 R. Grafl, A. Krall, C. Kruegel,
+## C. Oates, R. Obermaisser, M. Platter, M. Probst, S. Ring,
+## E. Steiner, C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich,
+## J. Wenninger, Institut f. Computersprachen - TU Wien
+##
+## This file is part of CACAO.
+##
+## This program is free software; you can redistribute it and/or
+## modify it under the terms of the GNU General Public License as
+## published by the Free Software Foundation; either version 2, or (at
+## your option) any later version.
+##
+## This program is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+## 02110-1301, USA.
+##
+## Contact: cacao@cacaojvm.org
+##
+## Authors: Christian Thalinger
+##
+## Changes: Michael Starzinger
+##
+## $Id$
+
+## Process this file with automake to produce Makefile.in
+
+AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/vm/jit/$(ARCH_DIR) -I$(top_srcdir)/src/vm/jit/$(ARCH_DIR)/$(OS_DIR)
+
+LIBS =
+
+noinst_LTLIBRARIES = libgc.la
+
+libgc_la_SOURCES = \
+       gc.c \
+       gc.h \
+       heap.c
+
+
+## Local variables:
+## mode: Makefile
+## indent-tabs-mode: t
+## c-basic-offset: 4
+## tab-width: 8
+## compile-command: "automake --add-missing"
+## End:
diff --git a/src/mm/cacao-gc/gc.c b/src/mm/cacao-gc/gc.c
new file mode 100644 (file)
index 0000000..04eec70
--- /dev/null
@@ -0,0 +1,100 @@
+/* src/mm/cacao-gc/gc.c - main garbage collector methods
+
+   Copyright (C) 1996-2005, 2006 R. Grafl, A. Krall, C. Kruegel,
+   C. Oates, R. Obermaisser, M. Platter, M. Probst, S. Ring,
+   E. Steiner, C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich,
+   J. Wenninger, Institut f. Computersprachen - TU Wien
+
+   This file is part of CACAO.
+
+   This program is free software; you can redistribute it and/or
+   modify it under the terms of the GNU General Public License as
+   published by the Free Software Foundation; either version 2, or (at
+   your option) any later version.
+
+   This program is distributed in the hope that it will be useful, but
+   WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+   02110-1301, USA.
+
+   Contact: cacao@cacaojvm.org
+
+   Authors: Michael Starzinger
+
+   Changes:
+
+   $Id$
+
+*/
+
+
+#include "config.h"
+#include <signal.h>
+#include <stdlib.h>
+#include "vm/types.h"
+
+#include "heap.h"
+#include "toolbox/logging.h"
+#include "vm/options.h"
+
+
+/* gc_init *********************************************************************
+
+   Initializes the garbage collector.
+
+*******************************************************************************/
+
+void gc_init(u4 heapmaxsize, u4 heapstartsize)
+{
+       if (opt_verbosegc)
+               dolog("GC: Initialising with heap-size %d (max. %d)",
+                       heapstartsize, heapmaxsize);
+
+       heap_base = malloc(heapstartsize);
+
+       if (heap_base == NULL)
+               exceptions_throw_outofmemory_exit();
+
+       heap_current_size = heapstartsize;
+       heap_maximal_size = heapmaxsize;
+
+       dolog("GC: Got base pointer %p", heap_base);
+}
+
+
+void gc_call(void)
+{
+       if (opt_verbosegc)
+               dolog("GC: Forced Collection");
+}
+
+
+int GC_signum1()
+{
+       return SIGUSR1;
+}
+
+
+int GC_signum2()
+{
+       return SIGUSR2;
+}
+
+
+/*
+ * These are local overrides for various environment variables in Emacs.
+ * Please do not remove this and leave it at the end of the file, where
+ * Emacs will automagically detect them.
+ * ---------------------------------------------------------------------
+ * Local variables:
+ * mode: c
+ * indent-tabs-mode: t
+ * c-basic-offset: 4
+ * tab-width: 4
+ * End:
+ */
diff --git a/src/mm/gc-common.h b/src/mm/gc-common.h
new file mode 100644 (file)
index 0000000..1d84e34
--- /dev/null
@@ -0,0 +1,81 @@
+/* src/mm/gc-common.h - gc independant interface for heap managment
+
+   Copyright (C) 1996-2005, 2006 R. Grafl, A. Krall, C. Kruegel,
+   C. Oates, R. Obermaisser, M. Platter, M. Probst, S. Ring,
+   E. Steiner, C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich,
+   J. Wenninger, Institut f. Computersprachen - TU Wien
+
+   This file is part of CACAO.
+
+   This program is free software; you can redistribute it and/or
+   modify it under the terms of the GNU General Public License as
+   published by the Free Software Foundation; either version 2, or (at
+   your option) any later version.
+
+   This program is distributed in the hope that it will be useful, but
+   WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+   02110-1301, USA.
+
+   Contact: cacao@cacaojvm.org
+
+   Authors: Christian Thalinger
+
+   Changes:
+
+   $Id: gc-common.h 5900 2006-11-04 17:30:44Z michi $
+
+*/
+
+
+#ifndef _GC_COMMON_H
+#define _GC_COMMON_H
+
+#include "config.h"
+#include "vm/types.h"
+
+#include "vm/method.h"
+
+
+/* function prototypes ********************************************************/
+
+void  gc_init(u4 heapmaxsize, u4 heapstartsize);
+
+void *heap_alloc_uncollectable(u4 bytelength);
+void *heap_allocate(u4 bytelength, u4 references, methodinfo *finalizer);
+void  heap_free(void *p);
+
+void  gc_call(void);
+s8    gc_get_heap_size(void);
+s8    gc_get_free_bytes(void);
+s8    gc_get_total_bytes(void);
+s8    gc_get_max_heap_size(void);
+void  gc_invoke_finalizers(void);
+void  gc_finalize_all(void);
+void *gc_out_of_memory(size_t bytes_requested);
+
+#if defined(DISABLE_GC)
+void  nogc_init(u4 heapmaxsize, u4 heapstartsize);
+void *nogc_realloc(void *src, s4 len1, s4 len2);
+#endif
+
+#endif /* _GC_COMMON_H */
+
+
+/*
+ * These are local overrides for various environment variables in Emacs.
+ * Please do not remove this and leave it at the end of the file, where
+ * Emacs will automagically detect them.
+ * ---------------------------------------------------------------------
+ * Local variables:
+ * mode: c
+ * indent-tabs-mode: t
+ * c-basic-offset: 4
+ * tab-width: 4
+ * End:
+ */
index 9c078b9b2ba658738cdaeca84b97b2339da3c915..0d84bf28722aae64913ead18debe8c6fa67b7728 100644 (file)
@@ -28,7 +28,7 @@
 
    Changes: Christian Thalinger
 
-   $Id: memory.h 5868 2006-10-30 11:21:36Z edwin $
+   $Id: memory.h 5900 2006-11-04 17:30:44Z michi $
 
 */
 
@@ -75,7 +75,7 @@ struct dumpinfo_t {
 
 /* internal includes **********************************************************/
 
-#include "mm/boehm.h"
+#include "mm/gc-common.h"
 
 
 /* 
index 86d3951ff84635b8b622c689655990ee26751455..2124bb26f0219e3bb5ff40db6e65d6ea2d20e43a 100644 (file)
@@ -28,7 +28,7 @@
 
    Changes:
 
-   $Id: nogc.c 5868 2006-10-30 11:21:36Z edwin $
+   $Id: nogc.c 5900 2006-11-04 17:30:44Z michi $
 
 */
 
@@ -42,7 +42,7 @@
 
 #include "boehm-gc/include/gc.h"
 
-#include "mm/boehm.h"
+#include "mm/gc-common.h"
 #include "mm/memory.h"
 #include "toolbox/logging.h"
 #include "vm/options.h"
index 8f5be412f1bdadaf674c836b0058d0d1e913fda7..cef178bf180c160fb03fb1c7421d50b19e4b8c79 100644 (file)
@@ -32,7 +32,7 @@
             Christian Thalinger
                        Edwin Steiner
 
-   $Id: jni.c 5821 2006-10-24 16:41:54Z edwin $
+   $Id: jni.c 5900 2006-11-04 17:30:44Z michi $
 
 */
 
@@ -44,7 +44,7 @@
 
 #include "vm/types.h"
 
-#include "mm/boehm.h"
+#include "mm/gc-common.h"
 #include "mm/memory.h"
 #include "native/jni.h"
 #include "native/native.h"
index b54df5651ebab26c3b02a9c6c37ad352a2982ecd..2b50b58db4d302bec8b142109e4abeedaf83cbea 100644 (file)
@@ -31,7 +31,7 @@
             Samuel Vinson
             Christan Thalinger
    
-   $Id: jvmti.c 5806 2006-10-19 10:10:23Z twisti $
+   $Id: jvmti.c 5900 2006-11-04 17:30:44Z michi $
 
 */
 
@@ -59,7 +59,7 @@
 #include "vm/jit/asmpart.h"
 #include "vm/class.h"
 #include "vm/classcache.h"
-#include "mm/boehm.h"
+#include "mm/gc-common.h"
 #include "toolbox/logging.h"
 #include "vm/options.h"
 #include "vm/stringlocal.h"
index 07137a3e2a34d41e5033cad35e6837f84e4e11a4..788781167d486c814be7edab52d5301effacf61b 100644 (file)
@@ -28,7 +28,7 @@
 
    Changes:
 
-   $Id: gennativetable.c 5638 2006-10-02 18:04:37Z twisti $
+   $Id: gennativetable.c 5900 2006-11-04 17:30:44Z michi $
 
 */
 
@@ -43,7 +43,7 @@
 #include "vm/types.h"
 
 #include "cacaoh/headers.h"
-#include "mm/boehm.h"
+#include "mm/gc-common.h"
 #include "mm/memory.h"
 
 #if defined(ENABLE_THREADS)
index 3f9b4a94127f729b067ff104e949c0a866631518..7ee69bfe485510c669b37b2642752501060a2638 100644 (file)
@@ -36,7 +36,7 @@
 #include "config.h"
 #include "vm/types.h"
 
-#include "mm/boehm.h"
+#include "mm/gc-common.h"
 
 #include "native/jni.h"
 
index c7a189cf680f62443612dab2e0fa53120b6ce836..4dc96e5ccc03fd9c7eef3ce581a18ad26926ec2d 100644 (file)
@@ -36,7 +36,7 @@
 #include "config.h"
 #include "vm/types.h"
 
-#include "mm/boehm.h"
+#include "mm/gc-common.h"
 
 #include "native/jni.h"
 #include "native/include/java_lang_management_MemoryUsage.h"
index b67a45fff7a092fa57f16953febe35f94605ea5b..596eb761a0585512bceda1b1a462fa7e2f9c05e9 100644 (file)
@@ -36,7 +36,7 @@
 #include "config.h"
 #include "vm/types.h"
 
-#include "mm/boehm.h"
+#include "mm/gc-common.h"
 
 #include "native/jni.h"
 #include "native/include/java_lang_management_ThreadInfo.h"
index 66cb88c2a1b638a6a734b6a44cc9cd06ea14c7cc..829e4c95a6575f3f28ba30862ea8da3ad4eed933 100644 (file)
@@ -29,7 +29,7 @@
    Changes: Joseph Wenninger
             Christian Thalinger
 
-   $Id: java_lang_VMObject.c 5153 2006-07-18 08:19:24Z twisti $
+   $Id: java_lang_VMObject.c 5900 2006-11-04 17:30:44Z michi $
 
 */
 
@@ -41,7 +41,7 @@
 
 #include "vm/types.h"
 
-#include "mm/boehm.h"
+#include "mm/gc-common.h"
 #include "mm/memory.h"
 #include "toolbox/logging.h"
 #include "native/jni.h"
index a5a0bdc56d99a961c7fbf61e679bd2203d3f3f01..c7cac9e9143730e4e0084b5b086e4ebd4b636c44 100644 (file)
@@ -30,7 +30,7 @@
             Christian Thalinger
                        Edwin Steiner
 
-   $Id: java_lang_VMRuntime.c 5153 2006-07-18 08:19:24Z twisti $
+   $Id: java_lang_VMRuntime.c 5900 2006-11-04 17:30:44Z michi $
 
 */
 
@@ -53,7 +53,7 @@
 
 #include "vm/types.h"
 
-#include "mm/boehm.h"
+#include "mm/gc-common.h"
 #include "mm/memory.h"
 #include "native/jni.h"
 #include "native/native.h"
index e68b5a792cb8d3e94d2cd9039e7f3d105631c259..2f2ab64fa71ba5ed5a561dc2ecc362823a3d438a 100644 (file)
@@ -29,7 +29,7 @@
    Changes: Christian Thalinger
                        Edwin Steiner
 
-   $Id: threads.c 5884 2006-10-31 20:11:28Z twisti $
+   $Id: threads.c 5900 2006-11-04 17:30:44Z michi $
 
 */
 
@@ -60,7 +60,7 @@
 # include "threads/native/generic-primitives.h"
 #endif
 
-#include "mm/boehm.h"
+#include "mm/gc-common.h"
 #include "mm/memory.h"
 #include "native/native.h"
 #include "native/include/java_lang_Object.h"
@@ -87,7 +87,9 @@
 #  define GC_IRIX_THREADS
 # endif
 # include <semaphore.h>
-# include "mm/boehm-gc/include/gc.h"
+# if defined(ENABLE_GC_BOEHM)
+#  include "mm/boehm-gc/include/gc.h"
+# endif
 #endif
 
 #if defined(ENABLE_JVMTI)
index f9f580e9270f4e2c0e39a649298dd27648c37dfa..466c12d986e1462fde80045cedf50bc908fe97d1 100644 (file)
@@ -37,7 +37,7 @@
    calls instead of machine instructions, using the C calling
    convention.
 
-   $Id: builtin.c 5862 2006-10-30 00:45:30Z edwin $
+   $Id: builtin.c 5900 2006-11-04 17:30:44Z michi $
 
 */
 
@@ -61,7 +61,7 @@
 # undef Bias
 #endif
 
-#include "mm/boehm.h"
+#include "mm/gc-common.h"
 #include "mm/memory.h"
 #include "native/native.h"
 #include "native/include/java_lang_Cloneable.h"
index e13b52291c9233e6719c1420f3645e6d7274b82e..9b3ecfdba2faf3d4a3fd47ffa8d5f758e9d76cce 100644 (file)
@@ -29,7 +29,7 @@
 
    Changes: Christian Thalinger
 
-   $Id: md-os.c 4921 2006-05-15 14:24:36Z twisti $
+   $Id: md-os.c 5900 2006-11-04 17:30:44Z michi $
 
 */
 
@@ -44,7 +44,7 @@
 
 #include "vm/jit/mips/md-abi.h"
 
-#include "mm/boehm.h"
+#include "mm/gc-common.h"
 #include "vm/exceptions.h"
 #include "vm/global.h"
 #include "vm/signallocal.h"
@@ -64,7 +64,9 @@ void md_init(void)
        /* The Boehm GC initialization blocks the SIGSEGV signal. So we do a      */
        /* dummy allocation here to ensure that the GC is initialized.            */
 
+#if defined(ENABLE_GC_BOEHM)
        heap_allocate(1, 0, NULL);
+#endif
 
 
        /* Turn off flush-to-zero */
index 5130ed0756eab0bd3bc2ce25f64b91ab2de8c011..b22e11b8321497520e18957cc55d026f0e06aad3 100644 (file)
@@ -29,7 +29,7 @@
 
    Changes: Christian Thalinger
 
-   $Id: md-os.c 5748 2006-10-12 13:13:18Z twisti $
+   $Id: md-os.c 5900 2006-11-04 17:30:44Z michi $
 
 */
 
@@ -44,7 +44,7 @@
 
 #include "vm/jit/mips/md-abi.h"
 
-#include "mm/boehm.h"
+#include "mm/gc-common.h"
 #include "vm/exceptions.h"
 #include "vm/signallocal.h"
 #include "vm/stringlocal.h"
@@ -63,7 +63,9 @@ void md_init(void)
        /* The Boehm GC initialization blocks the SIGSEGV signal. So we do a      */
        /* dummy allocation here to ensure that the GC is initialized.            */
 
+#if defined(ENABLE_GC_BOEHM)
        heap_allocate(1, 0, NULL);
+#endif
 
 #if 0
        /* Turn off flush-to-zero */
index 1d82826fec276f041e85ea4ff4e1d8fa785dd38e..6182c724d1be5c381adcb3fb127aad7300106856 100644 (file)
@@ -29,7 +29,7 @@
    Changes: Christian Thalinger
             Edwin Steiner
 
-   $Id: stacktrace.c 5805 2006-10-19 09:32:29Z twisti $
+   $Id: stacktrace.c 5900 2006-11-04 17:30:44Z michi $
 
 */
 
@@ -42,7 +42,7 @@
 
 #include "vm/types.h"
 
-#include "mm/boehm.h"
+#include "mm/gc-common.h"
 #include "mm/memory.h"
 #include "native/native.h"
 
index 9831fc5ac41f52fff2b2c3f2fa4a62005dec64b6..7ac810f6451304b7824e11f6de1a35eee16ad4af 100644 (file)
@@ -28,7 +28,7 @@
 
    Changes:
 
-   $Id: signal.c 5809 2006-10-20 13:09:54Z twisti $
+   $Id: signal.c 5900 2006-11-04 17:30:44Z michi $
 
 */
 
@@ -71,7 +71,9 @@ void signal_init(void)
        /* Allocate something so the garbage collector's signal handlers
           are installed. */
 
+#if defined(ENABLE_GC_BOEHM)
        (void) GCNEW(u1);
+#endif
 
        /* install signal handlers we need to convert to exceptions */
 
index ab96f11af6fc8bc21533d5836404acded535215b..d2f87dfb3696ed08815bd87bb92fc310e8adef81 100644 (file)
@@ -46,7 +46,7 @@
 
 #include "vm/types.h"
 
-#include "mm/boehm.h"
+#include "mm/gc-common.h"
 #include "mm/memory.h"
 #include "native/jni.h"
 #include "native/native.h"