Use Doug Lea's malloc as an alternative to YAP's standard malloc

don't use TR directly in scanner/parser, this avoids trouble with ^C while
consulting large files.
pass gcc -mno-cygwin to library compilation in cygwin environment (cygwin should
compile out of the box now).


git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1168 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
vsc
2004-10-28 20:12:23 +00:00
parent f267e74737
commit 2dfdca263d
19 changed files with 4503 additions and 83 deletions

View File

@@ -402,6 +402,8 @@ save_regs(int mode)
putout(Unsigned(HeapUsed));
/* Then the start of the free code */
putcellptr(CellPtr(FreeBlocks));
putcellptr(AuxSp);
putcellptr(CellPtr(AuxTop));
if (mode == DO_EVERYTHING) {
/* put the old trail base, just in case it moves again */
putout(ARG1);
@@ -680,6 +682,8 @@ get_heap_info(void)
OldHeapTop = (ADDR) get_cellptr();
OldHeapUsed = (Int) get_cell();
FreeBlocks = (BlockHeader *) get_cellptr();
AuxSp = get_cellptr();
AuxTop = (ADDR)get_cellptr();
HDiff = Unsigned(Yap_HeapBase) - Unsigned(OldHeapBase);
}
@@ -1065,6 +1069,10 @@ RestoreFreeSpace(void)
if (FreeBlocks != NULL)
FreeBlocks = BlockAdjust(FreeBlocks);
bpt = FreeBlocks;
if (AuxSp != NULL)
AuxSp = CellPtoHeapAdjust(AuxSp);
if (AuxTop != NULL)
AuxTop = AddrAdjust(AuxTop);
while (bpt != NULL) {
if (bpt->b_next != NULL) {
bsz = bpt->b_next = BlockAdjust(bpt->b_next);