mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-19 21:36:30 +00:00
增加内存分配日志监视器 (#424)
* 完成内存日志监视,并输出日志到文件 * 修复进程退出后,procfs查看进程status文件会崩溃的问题 * 修复signal唤醒进程的判断条件问题
This commit is contained in:
@ -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),
|
||||
}
|
||||
|
Reference in New Issue
Block a user