* src/mm/cacao-gc/gc.h (gc_collect): Added prototype.
authormichi <none@none>
Thu, 12 Apr 2007 09:25:25 +0000 (09:25 +0000)
committermichi <none@none>
Thu, 12 Apr 2007 09:25:25 +0000 (09:25 +0000)
* src/mm/cacao-gc/heap.c: Fixed includes.
* src/mm/cacao-gc/mark.c: Fixed includes.

--HG--
branch : exact-gc

src/mm/cacao-gc/gc.h
src/mm/cacao-gc/heap.c
src/mm/cacao-gc/mark.c

index deb5ad0a49872bda0fc3d7577b7e0bb2f4eec9ea..c9c7c566194453e5ed799f3b927f6ad751e91160 100644 (file)
@@ -130,6 +130,8 @@ extern sourcestate_t    *_no_threads_sourcestate;
 
 /* Prototypes *****************************************************************/
 
+void gc_collect(s4 level);
+
 #if defined(ENABLE_THREADS)
 bool gc_suspend(threadobject *thread, u1 *pc, u1 *sp);
 #endif
index 32df7c8204d6614f4c2dd1474d113bee72bdd1f8..657ee899f8d01b965d429a2be5036e312c506f8a 100644 (file)
 #include "mark.h"
 #include "region.h"
 #include "mm/memory.h"
-#include "src/native/include/java_lang_String.h" /* TODO: fix me! */
+#include "native/include/java_lang_String.h"
 #include "toolbox/logging.h"
 #include "vm/global.h"
+#include "vm/stringlocal.h"
+#include "vm/vm.h"
 #include "vmcore/rt-timing.h"
 
 
@@ -113,7 +115,7 @@ s4 heap_increase_size() {
 
        /* allocate new heap from the system */
        newsize = heap_current_size + increasesize;
-       p = malloc(newsize);
+       /*p = malloc(newsize);*/
 
        /* check if the newly allocated heap exists */
        if (p == NULL)
@@ -185,7 +187,7 @@ static java_objectheader *heap_alloc_intern(u4 bytelength, regioninfo_t *region,
                dolog("GC: Region out of memory!");
 
                if (collect) {
-                       gc_collect();
+                       gc_collect(0);
                        GC_ASSERT(region->free >= bytelength);
                } else
                        return NULL;
index cf60641cef823dfb3c07bb961c08267019b0c399..f58cd323c280fc88f7a435f6613a6d848326b23f 100644 (file)
@@ -37,6 +37,7 @@
 #include "mm/memory.h"
 #include "toolbox/logging.h"
 #include "vm/global.h"
+#include "vm/vm.h"
 #include "vmcore/linker.h"