XDataAllocator.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  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. #ifdef _M_X64
  7. #include "Memory/amd64/XDataAllocator.h"
  8. #elif defined(_M_ARM)
  9. #include "Memory/arm/XDataAllocator.h"
  10. #elif defined(_M_ARM64)
  11. #include "Memory/arm64/XDataAllocator.h"
  12. #endif
  13. #if PDATA_ENABLED && defined(_WIN32)
  14. struct FunctionTableNode
  15. {
  16. SLIST_ENTRY itemEntry;
  17. FunctionTableHandle functionTable;
  18. };
  19. struct DelayDeletingFunctionTable
  20. {
  21. static PSLIST_HEADER Head;
  22. static DelayDeletingFunctionTable Instance;
  23. static CriticalSection cs;
  24. DelayDeletingFunctionTable();
  25. ~DelayDeletingFunctionTable();
  26. static bool AddEntry(FunctionTableHandle ft);
  27. static void Clear();
  28. static bool IsEmpty();
  29. static void DeleteFunctionTable(void* functionTable);
  30. };
  31. #endif