Signed-off-by: Vegard Nossum <vegard.nos...@gmail.com> --- Makefile | 11 ++++++----- include/vm/gc.h | 8 ++++++++ vm/gc.c | 12 ++++++++++++ vm/jato.c | 2 ++ 4 files changed, 28 insertions(+), 5 deletions(-) create mode 100644 include/vm/gc.h create mode 100644 vm/gc.c
diff --git a/Makefile b/Makefile index 0c08821..d623810 100644 --- a/Makefile +++ b/Makefile @@ -97,15 +97,20 @@ JIT_OBJS = \ VM_OBJS = \ vm/bytecode.o \ vm/bytecodes.o \ + vm/call.o \ vm/class.o \ vm/classloader.o \ vm/debug-dump.o \ vm/die.o \ + vm/fault-inject.o \ vm/field.o \ + vm/gc.o \ vm/guard-page.o \ vm/itable.o \ vm/jar.o \ vm/jato.o \ + vm/jni.o \ + vm/jni-interface.o \ vm/method.o \ vm/natives.o \ vm/object.o \ @@ -120,11 +125,7 @@ VM_OBJS = \ vm/utf8.o \ vm/zalloc.o \ vm/preload.o \ - vm/reflection.o \ - vm/fault-inject.o \ - vm/jni.o \ - vm/jni-interface.o \ - vm/call.o + vm/reflection.o LIB_OBJS = \ lib/bitset.o \ diff --git a/include/vm/gc.h b/include/vm/gc.h new file mode 100644 index 0000000..6c39996 --- /dev/null +++ b/include/vm/gc.h @@ -0,0 +1,8 @@ +#ifndef VM_GC_H +#define VM_GC_H + +extern void *gc_safepoint_page; + +void gc_init(void); + +#endif diff --git a/vm/gc.c b/vm/gc.c new file mode 100644 index 0000000..f6c156a --- /dev/null +++ b/vm/gc.c @@ -0,0 +1,12 @@ +#include "vm/die.h" +#include "vm/gc.h" +#include "vm/guard-page.h" + +void *gc_safepoint_page; + +void gc_init(void) +{ + gc_safepoint_page = alloc_guard_page(); + if (!gc_safepoint_page) + die("Couldn't allocate GC safepoint guard page"); +} diff --git a/vm/jato.c b/vm/jato.c index 566e275..78973e5 100644 --- a/vm/jato.c +++ b/vm/jato.c @@ -58,6 +58,7 @@ #include "vm/class.h" #include "vm/classloader.h" #include "vm/fault-inject.h" +#include "vm/gc.h" #include "vm/preload.h" #include "vm/itable.h" #include "vm/jar.h" @@ -1180,6 +1181,7 @@ main(int argc, char *argv[]) jit_init_natives(); + gc_init(); static_fixup_init(); vm_jni_init(); -- 1.6.0.6 ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Jatovm-devel mailing list Jatovm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jatovm-devel