mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-15 08:30:02 +00:00
xous-rs: add increase_heap syscall
This is used in ARM version of dlmalloc-rs for Xous stdlib
This commit is contained in:
parent
0f420b7b63
commit
76114c060a
1 changed files with 10 additions and 0 deletions
|
|
@ -2053,6 +2053,16 @@ pub fn virt_to_phys(va: usize) -> core::result::Result<usize, Error> {
|
|||
})
|
||||
}
|
||||
|
||||
pub fn increase_heap(bytes: usize, flags: MemoryFlags) -> core::result::Result<MemoryRange, ()> {
|
||||
let res = crate::arch::syscall(SysCall::IncreaseHeap(bytes, flags));
|
||||
if let Ok(Result::MemoryRange(range)) = res
|
||||
{
|
||||
return Ok(range);
|
||||
}
|
||||
|
||||
Err(())
|
||||
}
|
||||
|
||||
/// Perform a raw syscall and return the result. This will transform
|
||||
/// `xous::Result::Error(e)` into an `Err(e)`.
|
||||
pub fn rsyscall(call: SysCall) -> SysCallResult {
|
||||
|
|
|
|||
Loading…
Reference in a new issue