mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-18 08:52:45 +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.
|
/// Print the number of RAM bytes used by the specified process.
|
||||||
/// This does not include memory such as peripherals and CSRs.
|
/// This does not include memory such as peripherals and CSRs.
|
||||||
|
#[cfg(baremetal)]
|
||||||
pub fn ram_used_by(&self, pid: PID) -> usize {
|
pub fn ram_used_by(&self, pid: PID) -> usize {
|
||||||
let mut owned_bytes = 0;
|
let mut owned_bytes = 0;
|
||||||
unsafe {
|
unsafe {
|
||||||
|
|
@ -194,6 +195,11 @@ impl MemoryManager {
|
||||||
owned_bytes
|
owned_bytes
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(not(baremetal))]
|
||||||
|
pub fn ram_used_by(&self, _pid: PID) -> usize {
|
||||||
|
0
|
||||||
|
}
|
||||||
|
|
||||||
#[cfg(all(baremetal, feature = "print-debug"))]
|
#[cfg(all(baremetal, feature = "print-debug"))]
|
||||||
pub fn print_ownership(&self) {
|
pub fn print_ownership(&self) {
|
||||||
println!("Ownership ({} bytes in all):", unsafe {
|
println!("Ownership ({} bytes in all):", unsafe {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue