mirror of
https://github.com/vishapoberon/compiler.git
synced 2026-04-06 06:22:25 +00:00
Restore 4*Unit heap allocation multiple.
This commit is contained in:
parent
66b7ea0be0
commit
265ac23f6e
1 changed files with 1 additions and 1 deletions
|
|
@ -270,7 +270,7 @@ MODULE Heap;
|
||||||
IF firstTry THEN
|
IF firstTry THEN
|
||||||
GC(TRUE); INC(blksz, Unit);
|
GC(TRUE); INC(blksz, Unit);
|
||||||
(* Anti-thrashing heuristics: ensure 1/5 of the heap will not be allocated. *)
|
(* Anti-thrashing heuristics: ensure 1/5 of the heap will not be allocated. *)
|
||||||
t := S.LSH(allocated + blksz, -2) (*uDIV 4*) * 5 ; (* Minimum preferred heapsize *)
|
t := S.LSH(allocated + blksz, -(ldUnit+2)) (*uDIV 4*Unit*) * (5*Unit) ; (* Minimum preferred heapsize *)
|
||||||
IF uLT(heapsize, t) THEN ExtendHeap(t - heapsize) END;
|
IF uLT(heapsize, t) THEN ExtendHeap(t - heapsize) END;
|
||||||
firstTry := FALSE; new := NEWREC(tag);
|
firstTry := FALSE; new := NEWREC(tag);
|
||||||
IF new = NIL THEN (* Heap is 1/5 free but fragmentation prevented allocation *)
|
IF new = NIL THEN (* Heap is 1/5 free but fragmentation prevented allocation *)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue