Skip to content

Commit

Permalink
abi: rename malloc into proxy_on_memory_allocate to make `cargo w…
Browse files Browse the repository at this point in the history
…asi test` work (#2)
  • Loading branch information
yskopets authored Apr 24, 2020
1 parent 3ebf309 commit 9f54cd4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/allocator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<u8> = Vec::with_capacity(size);
unsafe {
vec.set_len(size);
Expand Down

0 comments on commit 9f54cd4

Please sign in to comment.