Ver código fonte

* Removed dead code.

git-svn-id: trunk@9507 -
yury 17 anos atrás
pai
commit
b55501afef
1 arquivos alterados com 5 adições e 14 exclusões
  1. 5 14
      rtl/inc/heap.inc

+ 5 - 14
rtl/inc/heap.inc

@@ -1001,15 +1001,10 @@ end;
 function SysGetMem(size : ptruint):pointer;
 begin
 { Something to allocate ? }
-  if size<=0 then
-    begin
-      { give an error for < 0 }
-      if size<0 then
-        HandleError(204);
-      { we always need to allocate something, using heapend is not possible,
-        because heappend can be changed by growheap (PFV) }
-      size := 1;
-    end;
+  if size=0 then
+    { we always need to allocate something, using heapend is not possible,
+      because heappend can be changed by growheap (PFV) }
+    size := 1;
 { calc to multiple of 16 after adding the needed bytes for memchunk header }
   if size <= (maxblocksize - sizeof(tmemchunk_fixed_hdr)) then
     begin
@@ -1195,12 +1190,8 @@ end;
 
 Function SysFreeMemSize(p: pointer; size: ptruint):ptruint;
 begin
-  if size<=0 then
-  begin
-    if size<0 then
-      HandleError(204);
+  if size=0 then
     exit(0);
-  end;
   { can't free partial blocks, ignore size }
   result := SysFreeMem(p);
 end;