Hacked const and volatile modifiers a bit
[fw/sdcc] / support / Util / NewAlloc.c
index 949b1a8537b8f24bbe8aec5f041bff52a003509e..ff163999dbfa757ecdbf0449ec20c14fd357f032 100644 (file)
@@ -38,14 +38,17 @@ functions.
 #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 +271,3 @@ void freeTrace(allocTrace *ptrace)
   ptrace->palloced = NULL;
   ptrace->max = 0;
 }
-