comparison vmalloc.c @ 60:7b799a46cc87

Added compiler switch to turn on and off debug-only probes, deleted time-junk
author Me
date Mon, 08 Nov 2010 03:57:46 -0800
parents 3bac84e4e56e
children a6c442d52590 13b22ffb8a2f
comparison
equal deleted inserted replaced
2:af8d407abe7a 3:de4afbd8fc90
66 currElem = currElem->nextChunkInFreeList; 66 currElem = currElem->nextChunkInFreeList;
67 } 67 }
68 68
69 if( foundElem == NULL ) 69 if( foundElem == NULL )
70 { ERROR("\nmalloc failed\n") 70 { ERROR("\nmalloc failed\n")
71 return NULL; //indicates malloc failed 71 return (void *)NULL; //indicates malloc failed
72 } 72 }
73 //Using a kludge to identify the element that is the top chunk in the 73 //Using a kludge to identify the element that is the top chunk in the
74 // heap -- saving top-of-heap addr in head's nextHigherInMem -- and 74 // heap -- saving top-of-heap addr in head's nextHigherInMem -- and
75 // save addr of start of heap in head's nextLowerInMem 75 // save addr of start of heap in head's nextLowerInMem
76 //Will handle top of Heap specially 76 //Will handle top of Heap specially