mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-18 08:52:45 +00:00
remove heap monitoring from shellchat net image
This commit is contained in:
parent
1357d39255
commit
956eef4d69
1 changed files with 0 additions and 41 deletions
|
|
@ -289,43 +289,6 @@ impl<'a> ShellCmdApi<'a> for NetCmd {
|
||||||
}
|
}
|
||||||
#[cfg(feature="ditherpunk")]
|
#[cfg(feature="ditherpunk")]
|
||||||
"image" => {
|
"image" => {
|
||||||
let new_limit = 4096;// 2048 * 1024;
|
|
||||||
let result = xous::rsyscall(xous::SysCall::AdjustProcessLimit(
|
|
||||||
xous::Limits::HeapMaximum as usize,
|
|
||||||
0,
|
|
||||||
new_limit,
|
|
||||||
));
|
|
||||||
|
|
||||||
if let Ok(xous::Result::Scalar2(1, current_limit)) = result {
|
|
||||||
xous::rsyscall(xous::SysCall::AdjustProcessLimit(
|
|
||||||
xous::Limits::HeapMaximum as usize,
|
|
||||||
current_limit,
|
|
||||||
new_limit,
|
|
||||||
))
|
|
||||||
.unwrap();
|
|
||||||
log::info!("Our new heap is: {}", new_limit);
|
|
||||||
} else {
|
|
||||||
panic!("Unsupported syscall!");
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(feature="tracking-alloc")]
|
|
||||||
use tracking_allocator::{
|
|
||||||
AllocationGroupToken, AllocationRegistry,
|
|
||||||
};
|
|
||||||
#[cfg(feature="tracking-alloc")]
|
|
||||||
use crate::StdoutTracker;
|
|
||||||
#[cfg(feature="tracking-alloc")]
|
|
||||||
let mut local_token = {
|
|
||||||
let _ = AllocationRegistry::set_global_tracker(StdoutTracker{total: core::sync::atomic::AtomicIsize::new(0)})
|
|
||||||
.expect("no other global tracker should be set yet");
|
|
||||||
|
|
||||||
AllocationRegistry::enable_tracking();
|
|
||||||
AllocationGroupToken::register().expect("failed to register allocation group")
|
|
||||||
};
|
|
||||||
|
|
||||||
#[cfg(feature="tracking-alloc")]
|
|
||||||
let local_guard = local_token.enter();
|
|
||||||
|
|
||||||
// use std::io::BufRead; // not implemented yet!
|
// use std::io::BufRead; // not implemented yet!
|
||||||
if let Some(mut url) = tokens.next() {
|
if let Some(mut url) = tokens.next() {
|
||||||
match url.split_once('/') {
|
match url.split_once('/') {
|
||||||
|
|
@ -418,10 +381,6 @@ impl<'a> ShellCmdApi<'a> for NetCmd {
|
||||||
} else {
|
} else {
|
||||||
write!(ret, "Usage: image bunniefoo.com/bunnie/bunny.png").unwrap();
|
write!(ret, "Usage: image bunniefoo.com/bunnie/bunny.png").unwrap();
|
||||||
}
|
}
|
||||||
#[cfg(feature="tracking-alloc")]
|
|
||||||
drop(local_guard);
|
|
||||||
#[cfg(feature="tracking-alloc")]
|
|
||||||
AllocationRegistry::disable_tracking();
|
|
||||||
}
|
}
|
||||||
"tls" => {
|
"tls" => {
|
||||||
write!(ret, "Work in progress. Please check back later!").unwrap();
|
write!(ret, "Work in progress. Please check back later!").unwrap();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue