mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 09:29:26 +02:00
* avoid problems if sbrk returns negative values
This commit is contained in:
parent
bba120a2fd
commit
6d213ac89b
@ -732,7 +732,7 @@ begin
|
|||||||
if size<=GrowHeapSize1 then
|
if size<=GrowHeapSize1 then
|
||||||
begin
|
begin
|
||||||
NewPos:=Sbrk(GrowHeapSize1);
|
NewPos:=Sbrk(GrowHeapSize1);
|
||||||
if NewPos>0 then
|
if NewPos<>-1 then
|
||||||
size:=GrowHeapSize1;
|
size:=GrowHeapSize1;
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
@ -740,7 +740,7 @@ begin
|
|||||||
if size<=GrowHeapSize2 then
|
if size<=GrowHeapSize2 then
|
||||||
begin
|
begin
|
||||||
NewPos:=Sbrk(GrowHeapSize2);
|
NewPos:=Sbrk(GrowHeapSize2);
|
||||||
if NewPos>0 then
|
if NewPos<>-1 then
|
||||||
size:=GrowHeapSize2;
|
size:=GrowHeapSize2;
|
||||||
end
|
end
|
||||||
{ else alloate the needed bytes }
|
{ else alloate the needed bytes }
|
||||||
@ -807,7 +807,10 @@ end;
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.34 2000-02-10 13:59:35 peter
|
Revision 1.35 2000-03-10 12:41:21 pierre
|
||||||
|
* avoid problems if sbrk returns negative values
|
||||||
|
|
||||||
|
Revision 1.34 2000/02/10 13:59:35 peter
|
||||||
* fixed bug with reallocmem to use the wrong size when copying the
|
* fixed bug with reallocmem to use the wrong size when copying the
|
||||||
data to the new allocated pointer
|
data to the new allocated pointer
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user