* src/threads/threads-common.c (threads_thread_create_internal):
[cacao.git] / src / mm / memory.c
index 0f257dd3f19cd4da1983dda4423b75421bcb1ffb..bd864f8b7d98ba063a513125ecbd1f6aca6b9b0b 100644 (file)
@@ -22,7 +22,7 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: memory.c 7813 2007-04-25 19:20:13Z twisti $
+   $Id: memory.c 7831 2007-04-26 12:48:16Z twisti $
 
 */
 
@@ -107,13 +107,6 @@ static int                code_memory_size = 0;
 static int                pagesize         = 0;
 
 
-/* global variables ***********************************************************/
-
-#if defined(ENABLE_THREADS)
-static threadobject *thread_memory;
-#endif
-
-
 /* memory_init *****************************************************************
 
    Initialize the memory subsystem.
@@ -411,15 +404,11 @@ bool memory_start_thread(void)
 
        name = utf_new_char("Memory Profiler");
 
-       thread_memory = threads_thread_create_internal(name);
+       /* start the memory profiling thread */
 
-       if (thread_memory == NULL)
+       if (!threads_thread_start_internal(name, memory_thread))
                return false;
 
-       /* actually start the memory profiling thread */
-
-       threads_start_thread(thread_memory, memory_thread);
-
        /* everything's ok */
 
        return true;