* configure.ac: New switch for disabling -O2 (--disable-optimizations).
[cacao.git] / src / mm / gc-none.cpp
index b2c3053d46bf6a98148c14e663924bd80eb8ae5d..55eedeb0fb0a97f7228dd3719671a788c88af39f 100644 (file)
@@ -1,9 +1,7 @@
 /* src/mm/gc-none.cpp - allocates memory through malloc (no GC)
 
-   Copyright (C) 1996-2005, 2006, 2007 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
+   Copyright (C) 1996-2005, 2006, 2007, 2008
+   CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO
 
    This file is part of CACAO.
 
 
 #include <stdlib.h>
 
-#if defined(HAVE_SYS_MMAN_H)
-# include <sys/mman.h>
-#endif
-
 #include "vm/types.h"
 
 #include "boehm-gc/include/gc.h"
 
 #include "mm/gc.hpp"
-#include "mm/memory.h"
+#include "mm/memory.hpp"
 
-#include "toolbox/logging.h"
+#include "toolbox/logging.hpp"
 
-#include "vm/builtin.h"
-#include "vm/exceptions.h"
+#include "vm/jit/builtin.hpp"
 #include "vm/global.h"
-#include "vm/stringlocal.h"
+#include "vm/loader.hpp"
+#include "vm/options.h"
+#include "vm/os.hpp"
 #include "vm/vm.hpp"
 
-#include "vmcore/loader.h"
-#include "vmcore/options.h"
-
 
 /* global stuff ***************************************************************/
 
@@ -62,7 +54,7 @@ static int mmapsize = 0;
 static void *mmaptop = NULL;
 
 
-void *heap_alloc(u4 size, u4 references, methodinfo *finalizer, bool collect)
+void* heap_alloc(size_t size, int references, methodinfo *finalizer, bool collect)
 {
        void *m;
 
@@ -80,20 +72,20 @@ void *heap_alloc(u4 size, u4 references, methodinfo *finalizer, bool collect)
 }
 
 
-void *heap_alloc_uncollectable(u4 size)
+void* heap_alloc_uncollectable(size_t size)
 {
        return heap_alloc(size, false, NULL, false);
 }
 
 
-void heap_free(void *p)
+void heap_free(voidp)
 {
        /* nop */
 }
 
 
 
-void gc_init(u4 heapmaxsize, u4 heapstartsize)
+void gc_init(size_t heapmaxsize, size_t heapstartsize)
 {
        heapmaxsize = MEMORY_ALIGN(heapmaxsize, ALIGNSIZE);