byteduck / duckOS

An x86 monolithic kernel and operating system written in modern C++. Comes with in-house graphical applications and command line utilities, plus ports of existing software. And yes, it runs DOOM!
GNU General Public License v3.0
618 stars 25 forks source link

[BUG] Plug up those kernel memory leaks #52

Closed byteduck closed 1 year ago

byteduck commented 1 year ago

There are unidentified memory leaks somewhere in the kernel that need to be addressed. This is evidenced by the fact that if you repeatedly create and destroy processes, the memory usage slowly increases. I have no clue what's causing these leaks yet, but will update this issue once it's been identified.

byteduck commented 1 year ago

Update: It seemed like these leaks were caused by reference-counted pointers to threads not being cleaned up from the stack before a thread exited. I still need to do a little more testing, but these memory leaks seem to be fixed now.