Browse Source

* TinyHeapMinBlock defined as sizeof(TTinyHeapBlock), as that's the smallest
free block actually supported

git-svn-id: trunk@28401 -

nickysn 11 years ago
parent
commit
21246e973a
1 changed files with 3 additions and 4 deletions
  1. 3 4
      rtl/inc/tinyheap.inc

+ 3 - 4
rtl/inc/tinyheap.inc

@@ -37,10 +37,6 @@
 
 
       TTinyHeapPointerArithmeticType = ^Byte; {$ifdef FPC_HEAP_HUGE}huge;{$endif}
       TTinyHeapPointerArithmeticType = ^Byte; {$ifdef FPC_HEAP_HUGE}huge;{$endif}
 
 
-    const
-      TinyHeapMinBlock = 4*sizeof(pointer);
-
-    type
       PTinyHeapBlock = ^TTinyHeapBlock;
       PTinyHeapBlock = ^TTinyHeapBlock;
       TTinyHeapBlock = record
       TTinyHeapBlock = record
         Next: PTinyHeapBlock;
         Next: PTinyHeapBlock;
@@ -48,6 +44,9 @@
         EndAddr: pointer;
         EndAddr: pointer;
       end;
       end;
 
 
+    const
+      TinyHeapMinBlock = sizeof(TTinyHeapBlock);
+
     var
     var
       TinyHeapBlocks: PTinyHeapBlock = nil;
       TinyHeapBlocks: PTinyHeapBlock = nil;