From 722f3d30aaed9a88e77c20b789db84427fedf262 Mon Sep 17 00:00:00 2001 From: Yaroslav Skopets Date: Fri, 24 Apr 2020 23:21:05 +0200 Subject: [PATCH] abi: rename `malloc` into `proxy_on_memory_allocate` to make `cargo wasi test` work --- src/allocator.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/allocator.rs b/src/allocator.rs index 5e66543b..452b9211 100644 --- a/src/allocator.rs +++ b/src/allocator.rs @@ -16,7 +16,7 @@ static ALLOC: wee_alloc::WeeAlloc = wee_alloc::WeeAlloc::INIT; #[no_mangle] -pub extern "C" fn malloc(size: usize) -> *mut u8 { +pub extern "C" fn proxy_on_memory_allocate(size: usize) -> *mut u8 { let mut vec: Vec = Vec::with_capacity(size); unsafe { vec.set_len(size);