| 305 | } |
| 306 | |
| 307 | fextl::vector<MemoryRegion> Setup48BitAllocatorIfExists() { |
| 308 | size_t Bits = FEXCore::Allocator::DetermineVASize(); |
| 309 | if (Bits < 48) { |
| 310 | return {}; |
| 311 | } |
| 312 | |
| 313 | uintptr_t Begin48BitVA = 0x0'8000'0000'0000ULL; |
| 314 | uintptr_t End48BitVA = 0x1'0000'0000'0000ULL; |
| 315 | auto Regions = StealMemoryRegion(Begin48BitVA, End48BitVA); |
| 316 | |
| 317 | Alloc64 = Alloc::OSAllocator::Create64BitAllocatorWithRegions(Regions); |
| 318 | AssignHookOverrides(); |
| 319 | |
| 320 | return Regions; |
| 321 | } |
| 322 | |
| 323 | void ReclaimMemoryRegion(const fextl::vector<MemoryRegion>& Regions) { |
| 324 | for (const auto& Region : Regions) { |
no test coverage detected