I have bunch of functions for my pmm, but I came up with the problem: "What if another thread or process(assuming I ever get to that point) calls and allocates a page already assumed free in another that is paused(there inherently has to be some time between checking if a page is free and marking it used)?"
If tried to make an alloc_lock variable, but some functions that use the lock call other functions that use the lock so it causes the "nested" calls to react as though allocation is locked.
How should this be handled?
If any mod can think of a better title, go ahead and change it. I had no idea about what I'm asking about is called, but I'm sure there has to be a name for it.