Explorar el Código

* after r34939, it was not taken care of the extra storage needed for the size field, fixed, should fix #32875

git-svn-id: trunk@37883 -
florian hace 7 años
padre
commit
d315d3cc96
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      rtl/embedded/heapmgr.pp

+ 2 - 2
rtl/embedded/heapmgr.pp

@@ -49,10 +49,10 @@ Unit heapmgr;
         p, prev: PHeapBlock;
         AllocSize, RestSize: ptruint;
       begin
-        if size<MinBlock then
+        if size+sizeof(PtrUInt)<MinBlock then
           AllocSize := MinBlock
         else
-          AllocSize := align(size, sizeof(pointer));
+          AllocSize := align(size+sizeof(PtrUInt), sizeof(pointer));
 
         p := Blocks;
         prev := nil;