“Good operating system performance depends in part on the operating system’s ability to efficiently manage resources. In the old days, heap memory managers were the norm, but performance suffered due to fragmentation and the need for memory reclamation. Today, the Linux kernel uses a method that originated in Solaris but has been used in embedded systems for quite some time, allocating memory as objects based on their size. This article explores the ideas behind the slab allocator and examines its interfaces and their use.”
Note that the SLAB allocator will be replaced with the SLUB allocator once it’s proved stable.
It has a much simpler design than SLAB and scales better on SMP’s.
It was designed by Jeff Bonwick, the same guy behind ZFS, for Solaris. Later, the design was copied into Linux.
http://www.osgeek.blogspot.com
And later still, copied into AmigaOS 4.
http://www.amigaos4.com/index.php%3Foption=content&task=view&id…
Edited 2007-05-16 18:40
“The slab allocator used in Linux is based on an algorithm first introduced by Jeff Bonwick for the SunOS operating system.” sounds like a good defence; just in case Microsoft decide to patent “algorithms for allocating memory in slabs”
Everyone better start to track the lineage of their software.
No, no. They can’t patent algorithms. They would patent a “method and system for allocating memory for objects.” Grouping similar objects into slabs would be a sub-claim.
Lots of operating systems have a slab allocator, since it’s really a great thing.
DragonFly has one, Syllable has one, Haiku has got one too recently (courthesy of Hugo Santos).