git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1617 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
vsc
2006-04-28 16:14:05 +00:00
parent 9101c18410
commit 720db316ce
4 changed files with 17 additions and 21 deletions

View File

@@ -128,13 +128,6 @@ typedef struct scanner_extra_alloc {
void *filler;
} ScannerExtraBlock;
/* Problem: we use realloc so we cannot guarantee beforehand pointers will shift or not */
#if USE_SYSTEM_MALLOC
#define EXPAND_TRAIL FALSE
#else
#define EXPAND_TRAIL TRUE
#endif
static char *
AllocScannerMemory(unsigned int size)
{
@@ -156,7 +149,7 @@ AllocScannerMemory(unsigned int size)
if (size > alloc_size)
alloc_size = size;
if(!EXPAND_TRAIL || !Yap_growtrail(alloc_size, TRUE)) {
if(!Yap_growtrail(alloc_size, TRUE)) {
struct scanner_extra_alloc *ptr;
if (!(ptr = (struct scanner_extra_alloc *)malloc(size+sizeof(ScannerExtraBlock)))) {