CodeGenAllocators.h 953 B

12345678910111213141516171819202122232425
  1. //-------------------------------------------------------------------------------------------------------
  2. // Copyright (C) Microsoft. All rights reserved.
  3. // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
  4. //-------------------------------------------------------------------------------------------------------
  5. #pragma once
  6. class CodeGenAllocators
  7. {
  8. // emitBufferManager depends on allocator which in turn depends on pageAllocator, make sure the sequence is right
  9. private:
  10. PageAllocator pageAllocator;
  11. NoRecoverMemoryArenaAllocator allocator;
  12. public:
  13. EmitBufferManager<CriticalSection> emitBufferManager;
  14. #if !_M_X64_OR_ARM64 && _CONTROL_FLOW_GUARD
  15. bool canCreatePreReservedSegment;
  16. #endif
  17. CodeGenAllocators(AllocationPolicyManager * policyManager, Js::ScriptContext * scriptContext);
  18. ~CodeGenAllocators();
  19. #if DBG
  20. void ClearConcurrentThreadId();
  21. #endif
  22. };