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

Method MarkMemoryShared

FEXCore/Source/Interface/Core/Core.cpp:896–911  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

894}
895
896void ContextImpl::MarkMemoryShared(FEXCore::Core::InternalThreadState* Thread) {
897 if (!Thread) {
898 return;
899 }
900
901 if (!IsMemoryShared) {
902 IsMemoryShared = true;
903 UpdateAtomicTSOEmulationConfig();
904
905 if (Config.TSOAutoMigration) {
906 // Only the lookup cache is cleared here, so that old code can keep running until next compilation.
907 // This will leak previously compiled blocks until the CodeBuffer is cleared for some other reason.
908 Thread->LookupCache->ClearCache();
909 }
910 }
911}
912
913bool ContextImpl::ThreadRemoveCodeEntry(FEXCore::Core::InternalThreadState* Thread, uint64_t GuestRIP) {
914 LogMan::Throw::AFmt(static_cast<ContextImpl*>(Thread->CTX)->CodeInvalidationMutex.try_lock() == false, "CodeInvalidationMutex needs to "

Callers 3

CloneHandlerFunction · 0.80
GuestMmapMethod · 0.80
GuestShmatMethod · 0.80

Calls 1

ClearCacheMethod · 0.45

Tested by

no test coverage detected