creator-level saving new files in fat
[quarnos.git] / docs / SLOB.txt
blob2b1bd0416c8b734e7e067fc5ef1b0656663a3e75
1                 SLOB allocator
2                 --------------
4 Written by Pawel Dziepak <pdziepak@quarnos.org>
5 Last modified: July 25, 2008
7 1. Introduction
8 ---------------
10 SLOB (Simple List of Blocks) allocator was designed and created by Matt Mackall
11 to use it in Linux kernel while working on embedded system. Its advantages
12 are speed and small size of stored metadata. On the other hand SLOB allocator
13 memory quickly gets fragmented.
15 2. Algorithm
16 ------------
18 SLOB is based on standard K&R (Kernighan & Ritchie) heap allocator. It stores
19 lists of memory areas that are allocated. When system needs more space on heap
20 allocator goes through the areas and looks for a space between two blocks that
21 is big enough to fit new object. If none is found algorithm allocate memory
22 after the last block. SLOB uses first-fit policy which can be easily replaced
23 (by inheritance of slob class and replacing slob::allocate method) with other
24 policies such as best-fit.
26 More information
27 ----------------
29 The message on LKML by Matt Mackall introducing SLOB to Linux is mirrored
30 at this URL: http://lkml.org/lkml/2005/11/1/230