#endif
struct typemap * allocatetypemap() {
- struct typemap *thisvar=(struct typemap *) malloc(sizeof(struct typemap));
#ifdef CHECKTYPE||CHECKMEMORY
+ struct typemap *thisvar=(struct typemap *) malloc(sizeof(struct typemap));
thisvar->alloctree=rbinit();
thisvar->typetree=rbinit();
thisvar->low=GC_linux_stack_base();
-#endif
return thisvar;
+#else
+ return NULL;
+#endif
}
void freefunction(void *ptr) {
}
void typemapreset(struct typemap *ptr) {
+#ifdef CHECKTYPE||CHECKMEMORY
rbdestroy(ptr->typetree,freefunction);
ptr->typetree=rbinit();
if (ptr->low<ptr->high)
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->low<ptr->high)
rbinsert(ptr->low,ptr->high,NULL,ptr->alloctree);
else
rbinsert(ptr->high,ptr->low,NULL,ptr->alloctree);
+#endif
}
struct structuremap * allocatestructuremap(int s) {