Rev 764 | Rev 767 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 764 | Rev 766 | ||
|---|---|---|---|
| Line 35... | Line 35... | ||
| 35 | 35 | ||
| 36 | /** Initial Magazine size (TODO: dynamically growing magazines) */ |
36 | /** Initial Magazine size (TODO: dynamically growing magazines) */ |
| 37 | #define SLAB_MAG_SIZE 4 |
37 | #define SLAB_MAG_SIZE 4 |
| 38 | 38 | ||
| 39 | /** If object size is less, store control structure inside SLAB */ |
39 | /** If object size is less, store control structure inside SLAB */ |
| 40 | #define SLAB_INSIDE_SIZE (PAGE_SIZE / 6) |
40 | #define SLAB_INSIDE_SIZE (PAGE_SIZE >> 3) |
| 41 | 41 | ||
| 42 | /** Maximum wasted space we allow for cache */ |
42 | /** Maximum wasted space we allow for cache */ |
| 43 | #define SLAB_MAX_BADNESS(cache) ((PAGE_SIZE << (cache)->order) / 4) |
43 | #define SLAB_MAX_BADNESS(cache) ((PAGE_SIZE << (cache)->order >> 2)) |
| 44 | 44 | ||
| 45 | /* slab_reclaim constants */ |
45 | /* slab_reclaim constants */ |
| 46 | #define SLAB_RECLAIM_ALL 0x1 /**< Reclaim all possible memory, because |
46 | #define SLAB_RECLAIM_ALL 0x1 /**< Reclaim all possible memory, because |
| 47 | * we are in memory stress */ |
47 | * we are in memory stress */ |
| 48 | 48 | ||