From: sdattalo Date: Sun, 18 Feb 2001 04:31:44 +0000 (+0000) Subject: Resolved CVS merge conflicts X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=d92cc039b1bd6ddf52cecdc687f72b22523440aa;p=fw%2Fsdcc Resolved CVS merge conflicts git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@630 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- diff --git a/src/SDCCalloc.h b/src/SDCCalloc.h new file mode 100644 index 00000000..fc7fbb6a --- /dev/null +++ b/src/SDCCalloc.h @@ -0,0 +1,35 @@ + +#ifndef _SDCCalloc_H +#define _SDCCalloc_H + +#include "SDCCerr.h" + +#if OPT_DISABLE_GC != 0 + +# include +# 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 diff --git a/src/SDCCast.h b/src/SDCCast.h index 44d12425..735a6a93 100644 --- a/src/SDCCast.h +++ b/src/SDCCast.h @@ -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);