X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;ds=inline;f=Repair%2FRepairCompiler%2FMCC%2FCRuntime%2Ftmap.c;h=6cf599a495ea6fe2892a846d3cf0436059efbf9b;hb=7490e10346ba060181a5ff8072c6828a98730ec2;hp=bf03f04bada39ac855dcc5750b59d1d9e0b60708;hpb=9df765264fbe08940e8db8146ea8097733df06cf;p=repair.git diff --git a/Repair/RepairCompiler/MCC/CRuntime/tmap.c b/Repair/RepairCompiler/MCC/CRuntime/tmap.c index bf03f04..6cf599a 100755 --- a/Repair/RepairCompiler/MCC/CRuntime/tmap.c +++ b/Repair/RepairCompiler/MCC/CRuntime/tmap.c @@ -10,11 +10,15 @@ #endif struct typemap * allocatetypemap() { +#ifdef CHECKTYPE||CHECKMEMORY struct typemap *thisvar=(struct typemap *) malloc(sizeof(struct typemap)); thisvar->alloctree=rbinit(); thisvar->typetree=rbinit(); thisvar->low=GC_linux_stack_base(); return thisvar; +#else + return NULL; +#endif } void freefunction(void *ptr) { @@ -30,20 +34,24 @@ void freetypemap(struct typemap * ptr) { } void typemapreset(struct typemap *ptr) { +#ifdef CHECKTYPE||CHECKMEMORY rbdestroy(ptr->typetree,freefunction); ptr->typetree=rbinit(); if (ptr->lowhigh) rbdelete(ptr->low,ptr->alloctree); else rbdelete(ptr->high,ptr->alloctree); +#endif } void initializetypemapstack(struct typemap * ptr, void *high) { +#ifdef CHECKTYPE||CHECKMEMORY ptr->high=high; if (ptr->lowhigh) rbinsert(ptr->low,ptr->high,NULL,ptr->alloctree); else rbinsert(ptr->high,ptr->low,NULL,ptr->alloctree); +#endif } struct structuremap * allocatestructuremap(int s) {