Indeed, but some OSs (such as mine) also include a malloc and free implementation for the kernel -- a kmalloc() and kfree(), if you will.JAAman wrote: malloc and free are not usually part of the kernel
rather they are part of the user library (which is linked with the application at compile time)
It makes kernel development easier, in my opinion, when using things that don't necessarily fit well into a page allocator (dynamic lists, mutexes, semaphores, messages, etc).
Indeed, and I think a lot of microkernels continue on this route and have no kmalloc/kfree implementation. Personally, I find this limiting, though... I like everything to be dynamic and easy to manage. To do this, I make us of a lot of lists -- and sometimes even hash tables and binary trees -- in my kernel. These things (I find) are easier to develop with a byte allocator (but, of course, can be implemented without).JAAman wrote: for me (currently) i have no malloc/free for my kernel (most structures are 4k -- a complete page)
JAAman, just curious as to how you maintain some of these things that I maintain via lists-like structures... for example, your active task list. I assume you align your task structures such that they fit evenly into a page? Or another method?
Cheers,
--Jeff