implement simple memory snapshot mechanismus

Uses Copy on Write to make it posible to restore the memory state after a snapshot
was made. To restore all MemoryRegions created after the snapshot are removed.
This commit is contained in:
Takacs, Philipp
2022-12-22 15:14:07 +01:00
parent 065af19dc5
commit 80bd825420
25 changed files with 302 additions and 52 deletions

View File

@@ -1345,6 +1345,12 @@ size_t uc_context_size(uc_engine *uc);
UNICORN_EXPORT
uc_err uc_context_free(uc_context *context);
UNICORN_EXPORT
uc_err uc_snapshot(uc_engine *uc);
UNICORN_EXPORT
uc_err uc_restore_latest_snapshot(uc_engine *uc);
#ifdef __cplusplus
}
#endif