Support demand paging via closures and seh

Reverts 12a79192ee which exploits normal tcg mechanism

This uses a trampoline to pass extra data to seh handlers
This commit is contained in:
mio
2023-06-10 14:04:56 +02:00
parent 7b4dc569cc
commit 3d5b2643f0
6 changed files with 103 additions and 47 deletions

View File

@@ -6,11 +6,4 @@
// #define CONFIG_INT128 1
#define CONFIG_CMPXCHG128 1
// #define CONFIG_ATOMIC64 1
#define CONFIG_PLUGIN 1
// QEMU by default allocates (and commits) 1GB memory on Windows, and multiple Unicorn instances will result in OOM error easily.
// Unfortunately, Windows doesn't have a similar demand paging feature like mmap(), therefore a workaround is to use tcg regions mechanism.
// Note most Unicorn hacks (and even QEMU!) relies on the assumption that the translation memory won't run out and thus it might result
// in some unexpected errors. If that is case, define WIN32_QEMU_ALLOC_BUFFER to align with QEMU and Unicorn <= 2.0.1 behavior.
//
// #define WIN32_QEMU_ALLOC_BUFFER
#define CONFIG_PLUGIN 1