瀏覽代碼

* with section threadvars, heap relocation is not needed

git-svn-id: trunk@43130 -
florian 5 年之前
父節點
當前提交
c0372f80e0
共有 1 個文件被更改,包括 5 次插入0 次删除
  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;