Zbr's days.
July
Sun Mon Tue Wed Thu Fri Sat
           
31          
2006
Months
Jul

About TODO Blog RSS Old blog Projects Gallery Notes

Mon, 31 Jul 2006

Network tree allocator.


Freeing implementation uncovered a problem in the last algorithm - when system tries to free an object and searches in the AVL tree node's bitmask of free and used chunks, it is impossible to determine it's size if left neighbour (with increased size) is marked as used too. So I decided that freeing function will get a size of the object as parameter. Alternative variant is to store pointer to free objects inside some data structure (array, list or anything else), but that obviously requires additional memory and CPU overhead. Network stack always knows size of the each freed object, and actually even SLAB has special binding for cache objects and it's size, so I just decided to not introduce additional overhead right now and implement this later if there will be any need for that.

/devel/networking/nta :: Link / Comments (0)

Please solve this captcha to be allowed to post (need to reload in a minute): 34 + 91

Comments are closed for this story.