* support/regression/tests/bitfields.c:
[fw/sdcc] / support / Util / NewAlloc.c
index 949b1a8537b8f24bbe8aec5f041bff52a003509e..fb8a180aa75fae876c356533e4bcfa6c554424ba 100644 (file)
@@ -28,24 +28,22 @@ functions.
 */
 
 #include <stdio.h>
-#if defined(__APPLE__) && defined(__MACH__)
-#include <sys/malloc.h>
-#else
-#include <malloc.h>
-#endif
 #include <stdlib.h>
 #include <string.h>
 #include <memory.h>
 #include <assert.h>
 #include "newalloc.h"
-#include "sdccconf.h"
 
 #if OPT_ENABLE_LIBGC
 #include <gc/gc.h>
 
 #define MALLOC GC_malloc
 #define REALLOC GC_realloc
-#define FREE   GC_free
+/* PENDING: This is a mild hack.  If we try to GC_free something
+   allocated with malloc() then the program will segfault.  Might as
+   well drop it and let the garbase collector take care of things.
+*/
+#define FREE(_a)
 
 #else
 
@@ -268,4 +266,3 @@ void freeTrace(allocTrace *ptrace)
   ptrace->palloced = NULL;
   ptrace->max = 0;
 }
-