소스 검색

* 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 8 년 전
부모
커밋
d315d3cc96
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      rtl/embedded/heapmgr.pp

+ 2 - 2
rtl/embedded/heapmgr.pp

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