Browse Source

* with section threadvars, heap relocation is not needed

git-svn-id: trunk@43130 -
florian 5 years ago
parent
commit
c0372f80e0
1 changed files with 5 additions and 0 deletions
  1. 5 0
      rtl/inc/heap.inc

+ 5 - 0
rtl/inc/heap.inc

@@ -1633,11 +1633,16 @@ begin
   heap_lock_use := 1;
   initcriticalsection(heap_lock);
 {$endif}
+
+{$ifndef FPC_SECTION_THREADVARS}
+  { even if section threadvars are used, this shouldn't cause problems as loc_freelists simply
+    does not change but we do not need it }
   loc_freelists := @freelists;
   { loc_freelists still points to main thread's freelists, but they
     have a reference to the global main freelists, fix them to point
     to the main thread specific variable }
   modify_freelists(loc_freelists, loc_freelists);
+{$endif FPC_SECTION_THREADVARS}
   if MemoryManager.RelocateHeap <> nil then
     MemoryManager.RelocateHeap();
 end;