Re: RFC: Slab-o-rama (after Rene's suggestion)
"Alexander G. M. Smith" <[email protected]> Sun, 29 Apr 2007 14:19:22 -0400 EDT
| Newsgroups | gmane.os.openbeos.kernel.devel |
|---|---|
| Message-ID | <49150303013-BeMail@cr593174-a> |
Hugo Santos wrote on Mon, 23 Apr 2007 13:53:48 +0100: > The resource allocator Bonwick describes, "vmem", has constant > allocation time for one of the allocation algorithms which performs > very decently. We start with a large segment which contemplates all of > the resources (for instance [0, 0xffffffff)) and then just segment as > required. It uses external boundary tags to both track the resource > and merge back (coalesce) resources which were returned to the > allocator. We are only limited by memory. I suggest reading his paper, > it's nice. > > http://citeseer.ist.psu.edu/bonwick01magazines.html Thanks, was interesting reading. Though the use of gun magazine terminology was confusing - a full magazine is actually full of unallocated items. While an empty one is fully allocated. At least they were consistent in terminology. Anyway, having something that's scalable for multiple CPUs is particularly good for Haiku! Wish they had a better name than "vmem" for a general span/range/segment of things allocator. Last time I did something similar, it was with a linear implementation for some networking code. Nice to see they've done better, and combined it in interesting way with the slab allocator. - Alex ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/