mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 20:09:18 +02:00
* Removed dead code.
git-svn-id: trunk@9507 -
This commit is contained in:
parent
8b12a7f2c2
commit
b55501afef
@ -1001,15 +1001,10 @@ end;
|
|||||||
function SysGetMem(size : ptruint):pointer;
|
function SysGetMem(size : ptruint):pointer;
|
||||||
begin
|
begin
|
||||||
{ Something to allocate ? }
|
{ Something to allocate ? }
|
||||||
if size<=0 then
|
if size=0 then
|
||||||
begin
|
{ we always need to allocate something, using heapend is not possible,
|
||||||
{ give an error for < 0 }
|
because heappend can be changed by growheap (PFV) }
|
||||||
if size<0 then
|
size := 1;
|
||||||
HandleError(204);
|
|
||||||
{ we always need to allocate something, using heapend is not possible,
|
|
||||||
because heappend can be changed by growheap (PFV) }
|
|
||||||
size := 1;
|
|
||||||
end;
|
|
||||||
{ calc to multiple of 16 after adding the needed bytes for memchunk header }
|
{ calc to multiple of 16 after adding the needed bytes for memchunk header }
|
||||||
if size <= (maxblocksize - sizeof(tmemchunk_fixed_hdr)) then
|
if size <= (maxblocksize - sizeof(tmemchunk_fixed_hdr)) then
|
||||||
begin
|
begin
|
||||||
@ -1195,12 +1190,8 @@ end;
|
|||||||
|
|
||||||
Function SysFreeMemSize(p: pointer; size: ptruint):ptruint;
|
Function SysFreeMemSize(p: pointer; size: ptruint):ptruint;
|
||||||
begin
|
begin
|
||||||
if size<=0 then
|
if size=0 then
|
||||||
begin
|
|
||||||
if size<0 then
|
|
||||||
HandleError(204);
|
|
||||||
exit(0);
|
exit(0);
|
||||||
end;
|
|
||||||
{ can't free partial blocks, ignore size }
|
{ can't free partial blocks, ignore size }
|
||||||
result := SysFreeMem(p);
|
result := SysFreeMem(p);
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user