major project update & optimized heap implementation DONE!
So Ive been working on this project since flavortown ( another hackclub program that has ended) so ill shortly go over what ive already done and then elaborate on some of the new things i didnt log since then.
what did i already implement?
so ive finished the basic paging implementation (the way modern cpus use virtual addresses instead of physical) ive also did some basic interrupt handling and physical frame allocation (mostly for the paging mechanism)i also have basic vga for println and similar stuff
whats new?
ive been spending a lot of time researching and developing my own heap implementation and im finally done! it passed all tests and is functioning properly the heap is a mix of a standard freelist heap and a SLAB based caching system.
the way it works is like this:if an allocation is anywhere under 1024 bytes it goes for the cache bins for its power of 2 sizethen on freeing that space it will go back to the same cache if an allocation is greater than 1024 bytes it will go for the fallback allocator which acts like a standard freelist that allocates space based on the number of pages an allocation needs.
the interesting part i did is that the metadata itself thats storing the freelist node is saved on the heap and managed by the cache system!
because the freelist nodes only take up around 24 bytes of space their allocation is handled by the SLAB allocator which lets me store the nodes that the heap uses; on the heap ITSELF!