mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 11:06:19 +02:00
* fix for Mantis #35988: the internal heap uses directly the Sys* functions, not the memory manager
git-svn-id: trunk@42774 -
This commit is contained in:
parent
33f6adfab6
commit
db2a5285a9
@ -1530,7 +1530,7 @@ begin
|
|||||||
{$endif}
|
{$endif}
|
||||||
if not SysTryResizeMem(p,size) then
|
if not SysTryResizeMem(p,size) then
|
||||||
begin
|
begin
|
||||||
oldsize:=MemoryManager.MemSize(p);
|
oldsize:=SysMemSize(p);
|
||||||
{ Grow with bigger steps to prevent the need for
|
{ Grow with bigger steps to prevent the need for
|
||||||
multiple getmem/freemem calls for fixed blocks. It might cost a bit
|
multiple getmem/freemem calls for fixed blocks. It might cost a bit
|
||||||
of extra memory, but in most cases a reallocmem is done multiple times. }
|
of extra memory, but in most cases a reallocmem is done multiple times. }
|
||||||
@ -1549,7 +1549,7 @@ begin
|
|||||||
p2 := SysGetMem(newsize);
|
p2 := SysGetMem(newsize);
|
||||||
if p2<>nil then
|
if p2<>nil then
|
||||||
Move(p^,p2^,minsize);
|
Move(p^,p2^,minsize);
|
||||||
MemoryManager.FreeMem(p);
|
SysFreeMem(p);
|
||||||
p := p2;
|
p := p2;
|
||||||
{$ifdef DUMP_MEM_USAGE}
|
{$ifdef DUMP_MEM_USAGE}
|
||||||
end else begin
|
end else begin
|
||||||
|
Loading…
Reference in New Issue
Block a user