* src/vm/vm.c, src/vm/vm.h: Moved to .cpp.
[cacao.git] / src / mm / memory.c
index 4071d6bb430149a4d0736161ef8bda2edb4a664f..80951ee5e6e34f13bf88ea66b40586786d2385c9 100644 (file)
 #include "native/native.h"
 
 #include "threads/lock-common.h"
-#include "threads/threads-common.h"
+#include "threads/thread.h"
 
 #include "toolbox/logging.h"
 
 #include "vm/exceptions.h"
 #include "vm/global.h"
 #include "vm/stringlocal.h"
-#include "vm/vm.h"
+#include "vm/vm.hpp"
 
 #include "vmcore/options.h"
 
@@ -102,7 +102,7 @@ void *memory_checked_alloc(size_t size)
 }
 
 
-void *mem_alloc(s4 size)
+void *mem_alloc(int32_t size)
 {
        void *m;
 
@@ -130,7 +130,7 @@ void *mem_alloc(s4 size)
 }
 
 
-void *mem_realloc(void *src, s4 len1, s4 len2)
+void *mem_realloc(void *src, int32_t len1, int32_t len2)
 {
        void *dst;
 
@@ -166,7 +166,7 @@ void *mem_realloc(void *src, s4 len1, s4 len2)
 }
 
 
-void mem_free(void *m, s4 size)
+void mem_free(void *m, int32_t size)
 {
        if (!m) {
                if (size == 0)
@@ -201,6 +201,10 @@ static void memory_thread(void)
 {
        int32_t seconds;
 
+       /* Prevent compiler warning. */
+
+       seconds = 1;
+
        /* If both arguments are specified, use the value of
           ProfileMemoryUsage. */