Jump to content

英文维基 | 中文维基 | 日文维基 | 草榴社区

SLOB

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Amux (talk | contribs) at 17:27, 7 December 2012 (The article is probably outdated: SLAB was replaced by SLUB in version 2.6.33). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

The SLOB (Simple List Of Blocks) allocator is one of three available memory allocators in the Linux kernel. (The other two are SLAB and SLUB). The SLOB allocator is designed to be a small and efficient allocation framework for use in small systems such as embedded systems. Unfortunately, a major limitation of the SLOB allocator is that it suffers greatly from internal fragmentation.

SLOB currently uses a first-fit algorithm, which uses the first available space for memory. Recently a reply from Linus Torvalds on a Linux mailing list[1] was made where he suggested the use of a best-fit algorithm, which tries to find a memory block which suits needs best. Best fit finds the smallest space which fits the required amount available, avoiding loss of performance, both by fragmentation and consolidation of memory.

By default, Linux kernel used a SLAB Allocation system until version 2.6.23, when SLUB allocation became the default. When the CONFIG_SLAB flag is disabled, the kernel falls back to using the 'SLOB' allocator.[2] The SLOB allocator was used in DSLinux on Nintendo DS handheld console.

See also

References

  1. ^ http://lxr.free-electrons.com/source/mm/slob.c SLOB Allocator Documentation and code. Retrieved 12 November 2010
  2. ^ http://lwn.net/Articles/157944/ slob: introduce the SLOB Allocator . Retrieved 12 November 2010.