Citadel VMM Addition - Kernel Caches.
Posted: Sun Sep 24, 2006 2:11 pm
This is my fix for the issue that is fragmentation due to buddy allocation.
You allocate Kernel Caches.
Kernel caches are static sizes, but can be tweaked by changing defines.
Kernel caches must be power of two.
Kernel caches will let you allocate anything within them - sizes you want
(up to the cache freespace).
Some of the cache is used for internal tracking.
You can find how much is taken by this calculation...
TrackingSize = ((CACHE_SIZE/32)*4)+4
4100 Bytes are taken for a 32KiB Cache.
The caches have internal pointers to another cache, I havent added growing yet - but I will shortly.
Here is the current cache code.
(PS: Ive also tweaked and did some bughunting on the vMM.)
~Z
(cache.c included)
You allocate Kernel Caches.
Kernel caches are static sizes, but can be tweaked by changing defines.
Kernel caches must be power of two.
Kernel caches will let you allocate anything within them - sizes you want
(up to the cache freespace).
Some of the cache is used for internal tracking.
You can find how much is taken by this calculation...
TrackingSize = ((CACHE_SIZE/32)*4)+4
4100 Bytes are taken for a 32KiB Cache.
The caches have internal pointers to another cache, I havent added growing yet - but I will shortly.
Here is the current cache code.
(PS: Ive also tweaked and did some bughunting on the vMM.)
~Z
(cache.c included)