mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-15 08:30:02 +00:00
kernel: mem: fix build on hosted mode
Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
parent
e43f333faa
commit
5bca939c37
1 changed files with 6 additions and 0 deletions
|
|
@ -182,6 +182,7 @@ impl MemoryManager {
|
|||
|
||||
/// Print the number of RAM bytes used by the specified process.
|
||||
/// This does not include memory such as peripherals and CSRs.
|
||||
#[cfg(baremetal)]
|
||||
pub fn ram_used_by(&self, pid: PID) -> usize {
|
||||
let mut owned_bytes = 0;
|
||||
unsafe {
|
||||
|
|
@ -194,6 +195,11 @@ impl MemoryManager {
|
|||
owned_bytes
|
||||
}
|
||||
|
||||
#[cfg(not(baremetal))]
|
||||
pub fn ram_used_by(&self, _pid: PID) -> usize {
|
||||
0
|
||||
}
|
||||
|
||||
#[cfg(all(baremetal, feature = "print-debug"))]
|
||||
pub fn print_ownership(&self) {
|
||||
println!("Ownership ({} bytes in all):", unsafe {
|
||||
|
|
|
|||
Loading…
Reference in a new issue