xous: ffi: correct size of freed memory
The amount of memory allocated was multiplied by sizeof::<T>(), so the amount of memory to be freed should also be multiplied by sizeof::<T>(). Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
parent
dee1c260b8
commit
944dc21268
1 changed files with 1 additions and 1 deletions
|
@ -407,7 +407,7 @@ pub(crate) unsafe fn map_memory<T>(
|
|||
pub(crate) unsafe fn unmap_memory<T>(range: *mut [T]) -> Result<(), Error> {
|
||||
let mut a0 = Syscall::UnmapMemory as usize;
|
||||
let mut a1 = range.as_mut_ptr() as usize;
|
||||
let a2 = range.len();
|
||||
let a2 = range.len() * core::mem::size_of::<T>();
|
||||
let a3 = 0;
|
||||
let a4 = 0;
|
||||
let a5 = 0;
|
||||
|
|
Loading…
Add table
Reference in a new issue