Add uc_ctl_get/set_tcg_buffer_size
We still need this API because the virtual memory address space of 32 bits os is only 4GB and we default need 1G per instance Credits to @ZehMatt for original idea Co-authored-by: ζeh Matt <5415177+ZehMatt@users.noreply.github.com>
This commit is contained in:
14
uc.c
14
uc.c
@@ -2374,6 +2374,20 @@ uc_err uc_ctl(uc_engine *uc, uc_control_type control, ...)
|
||||
break;
|
||||
}
|
||||
|
||||
case UC_CTL_TCG_BUFFER_SIZE: {
|
||||
if (rw == UC_CTL_IO_WRITE) {
|
||||
uint32_t size = va_arg(args, uint32_t);
|
||||
uc->tcg_buffer_size = size;
|
||||
} else {
|
||||
|
||||
UC_INIT(uc);
|
||||
|
||||
uint32_t *size = va_arg(args, uint32_t *);
|
||||
*size = uc->tcg_buffer_size;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
err = UC_ERR_ARG;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user