nibblebits / PeachOS

Simple kernel designed for a online course
GNU General Public License v2.0
133 stars 55 forks source link

Memory leak process.c #8

Open JaihsonK opened 1 year ago

JaihsonK commented 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(); }

nibblebits commented 1 year ago

Thank you for this, once enough issues are identified I will be making another lecture where we fix them all