🆕 回收堆内存给操作系统

This commit is contained in:
fslongjin
2022-05-11 20:42:53 +08:00
parent edb21695ae
commit 1cc3db5e88
6 changed files with 311 additions and 88 deletions

View File

@ -53,7 +53,7 @@ void sched_cfs()
cli();
current_pcb->flags &= ~PF_NEED_SCHED;
struct process_control_block *proc = sched_cfs_dequeue();
// kdebug("sched_cfs_ready_queue[proc_current_cpu_id].count = %d", sched_cfs_ready_queue[proc_current_cpu_id].count);
if (current_pcb->virtual_runtime >= proc->virtual_runtime || current_pcb->state != PROC_RUNNING) // 当前进程运行时间大于了下一进程的运行时间,进行切换
{