MCPcopy Create free account
hub / github.com/FEX-Emu/FEX / NotifyMemoryAlloc

Function NotifyMemoryAlloc

Source/Windows/ARM64EC/Module.cpp:838–852  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

836}
837
838void NotifyMemoryAlloc(void* Address, SIZE_T Size, ULONG Type, ULONG Prot, BOOL After, NTSTATUS Status) {
839 if (!InvalidationTracker || !GetCPUArea().ThreadState()) {
840 return;
841 }
842
843 if (!After) {
844 ThreadCreationMutex.lock();
845 } else {
846 // MEM_RESET(_UNDO) ignores the passed permissions
847 if (!Status && !(Type & (MEM_RESET | MEM_RESET_UNDO))) {
848 InvalidationTracker->HandleMemoryProtectionNotification(reinterpret_cast<uint64_t>(Address), static_cast<uint64_t>(Size), Prot);
849 }
850 ThreadCreationMutex.unlock();
851 }
852}
853
854void NotifyMemoryFree(void* Address, SIZE_T Size, ULONG FreeType, BOOL After, NTSTATUS Status) {
855 if (!InvalidationTracker || !GetCPUArea().ThreadState()) {

Callers

nothing calls this directly

Calls 4

GetCPUAreaFunction · 0.85
lockMethod · 0.45
unlockMethod · 0.45

Tested by

no test coverage detected