Remove all references to the GC library, replacing GC_malloc
[fw/sdcc] / src / SDCCglobl.h
index 1c05ec56807083ecc6bf3fd129764da9dcc7a73f..96f760dbabc778b48a61b3fdfdf62646e706b05d 100644 (file)
@@ -27,8 +27,6 @@
 #define NATIVE_WIN32           1
 #endif
 
-# include  "SDCCalloc.h"
-
 #define SPACE ' '
 #define ZERO  0
 
@@ -90,9 +88,16 @@ typedef int bool;
     type *type##FreeStack [size]  ; \
     int   type##StackPtr = 0      ;
 
-#define ALLOCTYPE(type,size) if (!(type##Pool = GC_malloc(size*sizeof(type))))   \
+#define  ALLOC(x,sz) if (!(x = calloc(1, sz)))      \
+         {                                          \
+            werror(E_OUT_OF_MEM,__FILE__,(long) sz);\
+            exit (1);                               \
+         }
+
+
+#define ALLOCTYPE(type,size) if (!(type##Pool = calloc(1, size*sizeof(type))))\
          {                                                            \
-            werror(E_OUT_OF_MEM,__FILE__,(long) size);                          \
+            werror(E_OUT_OF_MEM,__FILE__,(long) size);               \
             exit (1);                                                \
          }