Subversion Repositories HelenOS

Rev

Rev 2444 | Rev 3182 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2444 Rev 2745
Line 51... Line 51...
51
 
51
 
52
/** If object size is less, store control structure inside SLAB */
52
/** If object size is less, store control structure inside SLAB */
53
#define SLAB_INSIDE_SIZE   (PAGE_SIZE >> 3)
53
#define SLAB_INSIDE_SIZE   (PAGE_SIZE >> 3)
54
 
54
 
55
/** Maximum wasted space we allow for cache */
55
/** Maximum wasted space we allow for cache */
56
#define SLAB_MAX_BADNESS(cache)   ((PAGE_SIZE << (cache)->order) >> 2)
56
#define SLAB_MAX_BADNESS(cache)   (((unsigned int) PAGE_SIZE << (cache)->order) >> 2)
57
 
57
 
58
/* slab_reclaim constants */
58
/* slab_reclaim constants */
59
 
59
 
60
/** Reclaim all possible memory, because we are in memory stress */
60
/** Reclaim all possible memory, because we are in memory stress */
61
#define SLAB_RECLAIM_ALL  0x1 
61
#define SLAB_RECLAIM_ALL  0x1 
Line 97... Line 97...
97
 
97
 
98
    /** Flags changing behaviour of cache */
98
    /** Flags changing behaviour of cache */
99
    int flags;
99
    int flags;
100
 
100
 
101
    /* Computed values */
101
    /* Computed values */
102
    uint8_t order;      /**< Order of frames to be allocated */
102
    uint8_t order;              /**< Order of frames to be allocated */
103
    int objects;        /**< Number of objects that fit in */
103
    unsigned int objects;       /**< Number of objects that fit in */
104
 
104
 
105
    /* Statistics */
105
    /* Statistics */
106
    atomic_t allocated_slabs;
106
    atomic_t allocated_slabs;
107
    atomic_t allocated_objs;
107
    atomic_t allocated_objs;
108
    atomic_t cached_objs;
108
    atomic_t cached_objs;