Browse Source

* cleared TODO from the win16 global heap, regarding the value of FirstFreeOfs,
when TotalFreeSpaceInBlock becomes 0. There's no new code needed to handle
this in BP7 compatible way; added comment, which explains why.

git-svn-id: trunk@37678 -

nickysn 7 years ago
parent
commit
d7b966c7eb
1 changed files with 5 additions and 1 deletions
  1. 5 1
      rtl/win16/glbheap.inc

+ 5 - 1
rtl/win16/glbheap.inc

@@ -123,7 +123,11 @@ circular linked list.
                             CurBlockP^.FirstFreeOfs:=Ofs(CurSubBlock^)+ASize;
                         end;
                       Dec(CurBlockP^.TotalFreeSpaceInBlock,ASize);
-                      { TODO: what is FirstFreeOfs if the entire block is allocated??? }
+                      { if TotalFreeSpaceInBlock becomes 0, then FirstFreeOfs
+                      should also become 0, but that is already handled
+                      correctly in the code above (in this case, by the
+                      line 'CurBlockP^.FirstFreeOfs:=CurSubBlock^.Next',
+                      so there's no need to set it explicitly here. }
                       exit;
                     end;
                   PrevSubBlock:=CurSubBlock;