Resolved CVS merge conflicts
authorsdattalo <sdattalo@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sun, 18 Feb 2001 04:31:44 +0000 (04:31 +0000)
committersdattalo <sdattalo@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sun, 18 Feb 2001 04:31:44 +0000 (04:31 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@630 4a8a32a2-be11-0410-ad9d-d568d2c75423

src/SDCCalloc.h [new file with mode: 0644]
src/SDCCast.h

diff --git a/src/SDCCalloc.h b/src/SDCCalloc.h
new file mode 100644 (file)
index 0000000..fc7fbb6
--- /dev/null
@@ -0,0 +1,35 @@
+
+#ifndef _SDCCalloc_H
+#define _SDCCalloc_H
+
+#include "SDCCerr.h"
+
+#if OPT_DISABLE_GC != 0
+
+# include <malloc.h>
+# define GC_malloc(x) calloc((x), 1)
+# define GC_free(x)   free(x)
+# define GC_realloc   realloc
+# define GC_malloc_atomic malloc
+
+#else
+
+#include "./gc/gc.h" 
+
+#endif
+
+
+#define  ALLOC(x,sz) if (!(x = GC_malloc(sz)))      \
+         {                                          \
+            werror(E_OUT_OF_MEM,__FILE__,(long) sz);\
+            exit (1);                               \
+         }
+
+#define ALLOC_ATOMIC(x,sz)   if (!((x) = GC_malloc_atomic(sz)))   \
+         {                                               \
+            werror(E_OUT_OF_MEM,__FILE__,(long) sz);     \
+            exit (1);                                    \
+         }
+
+
+#endif
index 44d1242516971de2ec407bdaae816a60849edf66..735a6a937a7441b91203014955d56bb07983a424 100644 (file)
@@ -166,6 +166,7 @@ ast;
 /* forward declarations for global variables */
 extern ast *staticAutos;
 extern FILE *codeOutFile;
+extern memmap *GcurMemmap;
 
 /* forward definitions for functions   */
 ast *newAst_VALUE (value * val);