Changeset 7669bcf in mainline
- Timestamp:
- 2006-06-03T21:57:30Z (18 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- eb3d379
- Parents:
- 9f16cb0
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
generic/src/mm/slab.c
r9f16cb0 r7669bcf 49 49 * 50 50 * When a new object is being allocated, it is first checked, if it is 51 * available in CPU-bound magazine. If it is not found there, it is52 * allocated from CPU-shared slab - if partial full is found, it is used,53 * otherwise a new one is allocated.54 * 55 * When an object is being deallocated, it is put to CPU-bound magazine.56 * If there is no such magazine, new one is allocated (if itfails,51 * available in a CPU-bound magazine. If it is not found there, it is 52 * allocated from a CPU-shared slab - if a partially full one is found, 53 * it is used, otherwise a new one is allocated. 54 * 55 * When an object is being deallocated, it is put to a CPU-bound magazine. 56 * If there is no such magazine, a new one is allocated (if this fails, 57 57 * the object is deallocated into slab). If the magazine is full, it is 58 * put into cpu-shared list of magazines and new one is allocated.59 * 60 * The CPU-bound magazine is actually a pair of magazine to avoid58 * put into cpu-shared list of magazines and a new one is allocated. 59 * 60 * The CPU-bound magazine is actually a pair of magazines in order to avoid 61 61 * thrashing when somebody is allocating/deallocating 1 item at the magazine 62 62 * size boundary. LIFO order is enforced, which should avoid fragmentation 63 63 * as much as possible. 64 64 * 65 * Every cache contains list of full slabs and list of partial y full slabs.65 * Every cache contains list of full slabs and list of partially full slabs. 66 66 * Empty slabs are immediately freed (thrashing will be avoided because 67 67 * of magazines). … … 72 72 * (the slab allocator uses itself for allocating all it's control structures). 73 73 * 74 * The slab allocator allocates lot of space and does not free it. When75 * frame allocator fails to allocate theframe, it calls slab_reclaim().74 * The slab allocator allocates a lot of space and does not free it. When 75 * the frame allocator fails to allocate a frame, it calls slab_reclaim(). 76 76 * It tries 'light reclaim' first, then brutal reclaim. The light reclaim 77 77 * releases slabs from cpu-shared magazine-list, until at least 1 slab
Note:
See TracChangeset
for help on using the changeset viewer.