增加内存分配日志监视器 (#424)

* 完成内存日志监视,并输出日志到文件
* 修复进程退出后,procfs查看进程status文件会崩溃的问题
* 修复signal唤醒进程的判断条件问题
This commit is contained in:
LoGin
2023-11-07 21:39:27 +08:00
committed by GitHub
parent 70a4e5550a
commit 7b32f5080f
46 changed files with 2033 additions and 59 deletions

View File

@ -16,9 +16,9 @@ pub struct IdAllocator {
impl IdAllocator {
/// 创建一个新的id分配器
pub const fn new(max_id: usize) -> Self {
pub const fn new(initial_id: usize, max_id: usize) -> Self {
Self {
current_id: AtomicUsize::new(0),
current_id: AtomicUsize::new(initial_id),
max_id,
dead: AtomicBool::new(false),
}