Changes: Christian Thalinger
- $Id: memory.c 3067 2005-07-19 14:11:42Z twisti $
+ $Id: memory.c 3205 2005-09-19 09:02:55Z twisti $
*/
/*******************************************************************************
- This structure is used for dump memory allocation if cacao runs without
- threads.
+ This structure is used for dump memory allocation if cacao runs
+ without threads.
*******************************************************************************/
#if !defined(USE_THREADS) || (defined(USE_THREADS) && !defined(NATIVE_THREADS))
-static dumpinfo nothreads_dumpinfo;
+static dumpinfo _no_threads_dumpinfo;
+#endif
+
+#if defined(USE_THREADS) && defined(NATIVE_THREADS)
+#define DUMPINFO &((threadobject *) THREADOBJECT)->dumpinfo
+#else
+#define DUMPINFO &_no_threads_dumpinfo
#endif
/* If no threads are used, the dumpinfo structure is a static structure */
/* defined at the top of this file. */
-#if defined(USE_THREADS) && defined(NATIVE_THREADS)
- di = &((threadobject *) THREADOBJECT)->dumpinfo;
-#else
- di = ¬hreads_dumpinfo;
-#endif
+ di = DUMPINFO;
if (size == 0)
return NULL;
/* If no threads are used, the dumpinfo structure is a static structure */
/* defined at the top of this file. */
-#if defined(USE_THREADS) && defined(NATIVE_THREADS)
- di = &((threadobject *) THREADOBJECT)->dumpinfo;
-#else
- di = ¬hreads_dumpinfo;
-#endif
+ di = DUMPINFO;
if (size < 0 || size > di->useddumpsize)
throw_cacao_exception_exit(string_java_lang_InternalError,
/* If no threads are used, the dumpinfo structure is a static structure */
/* defined at the top of this file. */
-#if defined(USE_THREADS) && defined(NATIVE_THREADS)
- di = &((threadobject *) THREADOBJECT)->dumpinfo;
-#else
- di = ¬hreads_dumpinfo;
-#endif
+ di = DUMPINFO;
if (!di)
return 0;