comparison vmalloc.c @ 157:8cc3d3812c8a

smaller Hists for malloc, free and plugin
author Merten Sach <msach@mailbox.tu-berlin.de>
date Thu, 06 Oct 2011 15:58:34 +0200
parents 0b49fd35afc1
children 99798e4438a6
comparison
equal deleted inserted replaced
23:314cb94c95a0 24:9dbc8c922b7e
101 else 101 else
102 currElem = currElem->nextChunkInFreeList; 102 currElem = currElem->nextChunkInFreeList;
103 } 103 }
104 104
105 if( foundElem == NULL ) 105 if( foundElem == NULL )
106 { ERROR("\nmalloc failed\n") 106 { ERROR1("\nMalloc failed, requested size: %d\n", sizeRequested);
107 return (void *)NULL; //indicates malloc failed 107 return (void *)NULL; //indicates malloc failed
108 } 108 }
109 //Using a kludge to identify the element that is the top chunk in the 109 //Using a kludge to identify the element that is the top chunk in the
110 // heap -- saving top-of-heap addr in head's nextHigherInMem -- and 110 // heap -- saving top-of-heap addr in head's nextHigherInMem -- and
111 // save addr of start of heap in head's nextLowerInMem 111 // save addr of start of heap in head's nextLowerInMem