浏览代码

[MERGE #401] Page allocator used by CustomHeap's metadata don't need standing free page

Merge pull request #401 from curtisman:freepage
The CustomHeap metadata isn't very big and we don't allocate them too often.
So we don't need standing free page for it (i.e. only commit if a page is in use)
Curtis Man 10 年之前
父节点
当前提交
aa68ca8fcc
共有 1 个文件被更改,包括 1 次插入4 次删除
  1. 1 4
      lib/Backend/CodeGenAllocators.cpp

+ 1 - 4
lib/Backend/CodeGenAllocators.cpp

@@ -5,10 +5,7 @@
 #include "Backend.h"
 
 CodeGenAllocators::CodeGenAllocators(AllocationPolicyManager * policyManager, Js::ScriptContext * scriptContext)
-: pageAllocator(policyManager, Js::Configuration::Global.flags, PageAllocatorType_BGJIT,
-                (AutoSystemInfo::Data.IsLowMemoryProcess() ?
-                 PageAllocator::DefaultLowMaxFreePageCount :
-                 PageAllocator::DefaultMaxFreePageCount))
+: pageAllocator(policyManager, Js::Configuration::Global.flags, PageAllocatorType_BGJIT, 0)
 , allocator(L"NativeCode", &pageAllocator, Js::Throw::OutOfMemory)
 , emitBufferManager(&allocator, scriptContext->GetThreadContext()->GetCodePageAllocators(), scriptContext, L"JIT code buffer")
 #if !_M_X64_OR_ARM64 && _CONTROL_FLOW_GUARD