From 53b799804766fb2ccd5bd97dfa17bf8a90fcc92e Mon Sep 17 00:00:00 2001 From: Christian Engwer <christi@dune-project.org> Date: Tue, 13 Feb 2018 18:15:28 +0100 Subject: [PATCH] [heap] remove now unused debug variables check_of_getcallstack and check_of_putcallstack were used to keep track of calls to the memory management. As most of it is now defered to the libc calls, we don't need these variables anymore. --- gm/ugm.cc | 19 ------------------- low/heaps.cc | 12 ------------ low/heaps.h | 11 ----------- 3 files changed, 42 deletions(-) diff --git a/gm/ugm.cc b/gm/ugm.cc index 1990bb84a..93539cd3a 100644 --- a/gm/ugm.cc +++ b/gm/ugm.cc @@ -307,10 +307,6 @@ void * NS_DIM_PREFIX GetMemoryForObjectNew (HEAP *theHeap, INT size, INT type) { void *obj; - #ifdef Debug - check_of_getcallstack = 1; - #endif - if (theHeap->usefreelistmemory == 1) obj = GetFreelistMemory(theHeap, size); else @@ -330,10 +326,6 @@ void * NS_DIM_PREFIX GetMemoryForObjectNew (HEAP *theHeap, INT size, INT type) memset(obj,0,size); } - #ifdef Debug - check_of_getcallstack = 0; - #endif - #ifdef ModelP if (type!=MAOBJ && type!=COOBJ) ConstructDDDObject(obj,size,type); @@ -397,16 +389,9 @@ INT NS_DIM_PREFIX PutFreeObjectNew (HEAP *theHeap, void *object, INT size, INT t DestructDDDObject(object,type); #endif - #ifdef Debug - check_of_putcallstack = 1; - #endif - if (theHeap->usefreelistmemory == 1) { err = PutFreelistMemory(theHeap, object, size); - #ifdef Debug - check_of_putcallstack = 0; - #endif return (err); } @@ -421,10 +406,6 @@ INT NS_DIM_PREFIX PutFreeObjectNew (HEAP *theHeap, void *object, INT size, INT t } #endif - #ifdef Debug - check_of_putcallstack = 0; - #endif - /* memory is freed by release */ return(0); } diff --git a/low/heaps.cc b/low/heaps.cc index a81c6f84f..93ece2de5 100644 --- a/low/heaps.cc +++ b/low/heaps.cc @@ -78,18 +78,6 @@ USING_UG_NAMESPACE REP_ERR_FILE - -/****************************************************************************/ -/* */ -/* definition of exported global variables */ -/* */ -/****************************************************************************/ - -#if defined(DYNAMIC_MEMORY_ALLOCMODEL) && defined(Debug) -INT NS_PREFIX check_of_getcallstack = 0; -INT NS_PREFIX check_of_putcallstack = 0; -#endif - /****************************************************************************/ /** \brief Install a new heap structure diff --git a/low/heaps.h b/low/heaps.h index 748fdfad3..1e127223e 100644 --- a/low/heaps.h +++ b/low/heaps.h @@ -182,17 +182,6 @@ typedef struct { typedef INT BLOCK_ID; typedef struct block BLOCK; -/****************************************************************************/ -/* */ -/* definition of exported global variables */ -/* */ -/****************************************************************************/ - -#if defined(DYNAMIC_MEMORY_ALLOCMODEL) && defined(Debug) -extern INT check_of_getcallstack; -extern INT check_of_putcallstack; -#endif - /****************************************************************************/ /* */ /* function declarations */ -- GitLab