| 16 | class CodeSizeValidation final { |
| 17 | public: |
| 18 | CodeSizeValidation() { |
| 19 | constexpr uint64_t Code_start_page = 0x1'0000; |
| 20 | |
| 21 | CodeStart = FEXCore::Allocator::mmap(reinterpret_cast<void*>(Code_start_page), MAX_CODE_SIZE, PROT_READ | PROT_WRITE, |
| 22 | MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); |
| 23 | if (reinterpret_cast<uint64_t>(CodeStart) != Code_start_page) { |
| 24 | LogMan::Msg::AFmt("Couldn't allocate test region!"); |
| 25 | FEXCore::Allocator::VirtualFree(CodeStart, MAX_CODE_SIZE); |
| 26 | CodeStart = nullptr; |
| 27 | return; |
| 28 | } |
| 29 | } |
| 30 | |
| 31 | struct InstructionStats { |
| 32 | uint64_t GuestCodeInstructions {}; |
nothing calls this directly
no test coverage detected