mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-09 00:46:00 +02:00
* return nil in TraceGetMem if SysGetMem returns nil
git-svn-id: trunk@6811 -
This commit is contained in:
parent
85189db6fe
commit
4f3f5d042b
@ -371,7 +371,14 @@ begin
|
|||||||
{$endif cpuarm}
|
{$endif cpuarm}
|
||||||
if add_tail then
|
if add_tail then
|
||||||
inc(allocsize,sizeof(ptrint));
|
inc(allocsize,sizeof(ptrint));
|
||||||
|
{ if ReturnNilIfGrowHeapFails is true
|
||||||
|
SysGetMem can return nil }
|
||||||
p:=SysGetMem(allocsize);
|
p:=SysGetMem(allocsize);
|
||||||
|
if (p=nil) then
|
||||||
|
begin
|
||||||
|
TraceGetMem:=nil;
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
pp:=pheap_mem_info(p);
|
pp:=pheap_mem_info(p);
|
||||||
inc(p,sizeof(theap_mem_info));
|
inc(p,sizeof(theap_mem_info));
|
||||||
{ Create the info block }
|
{ Create the info block }
|
||||||
|
Loading…
Reference in New Issue
Block a user