feat: Add instruction metering for interpreter (#4122)
- add instruction metering support with execution limit - initialize instruction execution limit in exec_env - docs: add instruction metering section to build_wamr documentation
This commit is contained in:
@ -2285,6 +2285,15 @@ wasm_runtime_access_exce_check_guard_page()
|
||||
}
|
||||
#endif
|
||||
|
||||
#if WASM_ENABLE_INSTRUCTION_METERING != 0
|
||||
void
|
||||
wasm_runtime_set_instruction_count_limit(WASMExecEnv *exec_env,
|
||||
int instructions_to_execute)
|
||||
{
|
||||
exec_env->instructions_to_execute = instructions_to_execute;
|
||||
}
|
||||
#endif
|
||||
|
||||
WASMFuncType *
|
||||
wasm_runtime_get_function_type(const WASMFunctionInstanceCommon *function,
|
||||
uint32 module_type)
|
||||
|
||||
Reference in New Issue
Block a user