Linux: port the emulator to a working state on Linux (#117)

Linux: port the emulator to a working state
This commit is contained in:
Stefanos Costa
2026-07-29 01:25:58 +03:00
committed by GitHub
parent 3dc793d859
commit 2b9cba457e
30 changed files with 2320 additions and 381 deletions
+7 -1
View File
@@ -385,9 +385,12 @@ public:
m_maps.emplace(old.vaddr, old);
return false;
}
#if KYTY_PLATFORM == KYTY_PLATFORM_WINDOWS
if (preserve_placeholder && placeholder_preserved != nullptr) {
*placeholder_preserved = true;
}
#endif
// Only Windows preserves placeholders.
return true;
}
@@ -1079,7 +1082,10 @@ private:
#endif
}
static bool UnmapViewPreservePlaceholder(void* /*vaddr*/, uint64_t /*size*/) { return false; }
// POSIX has no placeholder equivalent.
static bool UnmapViewPreservePlaceholder(void* vaddr, uint64_t size) {
return munmap(vaddr, size) == 0;
}
int m_fd = -1;
#endif