src/share/demo/jvmti/hprof/debug_malloc.h
Print this page
@@ -57,10 +57,15 @@
#ifdef DEBUG
#include <stdlib.h>
#include <string.h>
+/* Use THIS_FILE when it is available. */
+#ifndef THIS_FILE
+ #define THIS_FILE __FILE__
+#endif
+
/* The real functions behind the macro curtains. */
void *debug_malloc(size_t, const char *, int);
void *debug_realloc(void *, size_t, const char *, int);
void *debug_calloc(size_t, size_t, const char *, int);
@@ -69,12 +74,12 @@
#endif
void debug_malloc_verify(const char*, int);
#undef malloc_verify
-#define malloc_verify() debug_malloc_verify(__FILE__, __LINE__)
+#define malloc_verify() debug_malloc_verify(THIS_FILE, __LINE__)
void debug_malloc_police(const char*, int);
#undef malloc_police
-#define malloc_police() debug_malloc_police(__FILE__, __LINE__)
+#define malloc_police() debug_malloc_police(THIS_FILE, __LINE__)
#endif