Open JaihsonK opened 1 year ago
process_load_for_slot kzallocs a new struct process, but never kfrees it. Possible solution: process_unlink(): processes[process->id] = 0; kfree(process); if (current_process == process) { process_switch_to_any(); }
processes[process->id] = 0;
kfree(process);
if (current_process == process)
{
process_switch_to_any();
}
Thank you for this, once enough issues are identified I will be making another lecture where we fix them all
process_load_for_slot kzallocs a new struct process, but never kfrees it. Possible solution: process_unlink():
processes[process->id] = 0;
kfree(process);
if (current_process == process)
{
process_switch_to_any();
}