Optimize memory handling (#1963)
* optimize ram block handling Save the last element of the ram_list. This allows to faster find where to add new elements when they are not bigger then page size. * save ram_list freed this keeps the optimization for find_ram_offset() intact after snapshot restore. * cow only clear the tlb of affected pages * update flatview when possible Building each flatview new when the memory has changed is quite expensive when many MemoryRegions are used. This is an issue when using snapshots. * update benchmark for new api * save flatview in context this avoids rebuilding the flatview when restore a context. * init context flatview with zero * address_space_dispatch_clear remove subpage with higher priority * docutemnt the options for UC_CTL_CONTEXT_MODE Specialy stress that with UC_CTL_CONTEXT_MEMORY it is not possible to use the context with a different unicorn object.
This commit is contained in:
@@ -140,6 +140,7 @@ static inline void uc_common_init(struct uc_struct* uc)
|
||||
uc->set_tlb = uc_set_tlb;
|
||||
uc->memory_mapping = find_memory_mapping;
|
||||
uc->memory_filter_subregions = memory_region_filter_subregions;
|
||||
uc->flatview_copy = flatview_copy;
|
||||
uc->memory_cow = memory_cow;
|
||||
|
||||
if (!uc->release)
|
||||
|
||||
Reference in New Issue
Block a user