mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-22 00:09:42 +02:00
* fixed growheap freelist addition when heapend-heapptr<blocksize
This commit is contained in:
parent
4d5712cc69
commit
c7d01df165
@ -463,15 +463,18 @@ begin
|
|||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
{ create freelist entry for old heapptr-heapend }
|
{ create freelist entry for old heapptr-heapend }
|
||||||
pcurr:=pfreerecord(heapptr);
|
if heapend-heapptr>blocksize then
|
||||||
pcurr^.size:=heapend-heapptr;
|
begin
|
||||||
pcurr^.root:=@freelists[0];
|
pcurr:=pfreerecord(heapptr);
|
||||||
{ insert the block in the freelist }
|
pcurr^.size:=heapend-heapptr;
|
||||||
pcurr^.next:=freelists[0];
|
pcurr^.root:=@freelists[0];
|
||||||
pcurr^.prev:=nil;
|
{ insert the block in the freelist }
|
||||||
if assigned(freelists[0]) then
|
pcurr^.next:=freelists[0];
|
||||||
freelists[0]^.prev:=pcurr;
|
pcurr^.prev:=nil;
|
||||||
freelists[0]:=pcurr;
|
if assigned(freelists[0]) then
|
||||||
|
freelists[0]^.prev:=pcurr;
|
||||||
|
freelists[0]:=pcurr;
|
||||||
|
end;
|
||||||
{ now set the new heapptr,heapend to the new block }
|
{ now set the new heapptr,heapend to the new block }
|
||||||
heapptr:=pointer(newpos);
|
heapptr:=pointer(newpos);
|
||||||
heapend:=pointer(newpos+size);
|
heapend:=pointer(newpos+size);
|
||||||
@ -503,7 +506,10 @@ end;
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.16 1999-09-17 17:14:12 peter
|
Revision 1.17 1999-09-20 14:17:37 peter
|
||||||
|
* fixed growheap freelist addition when heapend-heapptr<blocksize
|
||||||
|
|
||||||
|
Revision 1.16 1999/09/17 17:14:12 peter
|
||||||
+ new heap manager supporting delphi freemem(pointer)
|
+ new heap manager supporting delphi freemem(pointer)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user