Rework guest memory tracking/virtual address space/direct and flexible memory (#135)

* Rework guest memory tracking

* add unknwon flag

* Fix macOS guest address-space reservation
This commit is contained in:
nmzik
2026-07-31 03:07:17 +02:00
committed by GitHub
parent ecb48f90bb
commit 2f5396c6a5
28 changed files with 3155 additions and 2887 deletions
+9 -3
View File
@@ -48,9 +48,10 @@ struct LibraryId {
struct ThreadLocalStorage {
struct Block {
uint8_t* ptr = nullptr;
application_heap_free_func_t free_func = nullptr;
bool vm_alloc = false;
uint8_t* ptr = nullptr;
application_heap_free_func_t free_func = nullptr;
bool vm_alloc = false;
uint64_t alloc_size = 0;
};
~ThreadLocalStorage();
@@ -204,6 +205,11 @@ private:
application_heap_posix_memalign_func_t m_application_heap_posix_memalign = nullptr;
};
#if defined(KYTY_VIRTUAL_MEMORY_ALLOCATION_TESTS)
bool TestMainEntryUsesGuestStack();
bool TestModuleRelocationUsesWritableHostMapping();
#endif
} // namespace Loader
#endif /* EMULATOR_INCLUDE_EMULATOR_LOADER_RUNTIMELINKER_H_ */