mirror of
https://github.com/fluencelabs/wasmer
synced 2025-06-13 17:11:21 +00:00
Call malloc, memalign, memset from exports instead of emscripten_data
This commit is contained in:
@ -1,10 +1,11 @@
|
||||
use super::process::_abort;
|
||||
use crate::apis::emscripten::env;
|
||||
use crate::webassembly::Instance;
|
||||
|
||||
/// emscripten: ___cxa_allocate_exception
|
||||
pub extern "C" fn ___cxa_allocate_exception(size: u32, instance: &mut Instance) -> u32 {
|
||||
debug!("emscripten::___cxa_allocate_exception");
|
||||
(instance.emscripten_data().as_ref().unwrap().malloc)(size as _, instance)
|
||||
env::call_malloc(size as _, instance)
|
||||
}
|
||||
|
||||
/// emscripten: ___cxa_throw
|
||||
|
Reference in New Issue
Block a user