#[no_mangle] pub unsafe extern "C" fn allocate(size: i32) -> *const u8
We hand over the the pointer to the allocated memory. Caller has to ensure that the memory gets freed again.