Rev 4377 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4377 | Rev 4692 | ||
---|---|---|---|
Line 70... | Line 70... | ||
70 | /** We add magazine cache later, if we have this flag */ |
70 | /** We add magazine cache later, if we have this flag */ |
71 | #define SLAB_CACHE_MAGDEFERRED (0x04 | SLAB_CACHE_NOMAGAZINE) |
71 | #define SLAB_CACHE_MAGDEFERRED (0x04 | SLAB_CACHE_NOMAGAZINE) |
72 | 72 | ||
73 | typedef struct { |
73 | typedef struct { |
74 | link_t link; |
74 | link_t link; |
75 | count_t busy; /**< Count of full slots in magazine */ |
75 | size_t busy; /**< Count of full slots in magazine */ |
76 | count_t size; /**< Number of slots in magazine */ |
76 | size_t size; /**< Number of slots in magazine */ |
77 | void *objs[]; /**< Slots in magazine */ |
77 | void *objs[]; /**< Slots in magazine */ |
78 | } slab_magazine_t; |
78 | } slab_magazine_t; |
79 | 79 | ||
80 | typedef struct { |
80 | typedef struct { |
81 | slab_magazine_t *current; |
81 | slab_magazine_t *current; |
Line 126... | Line 126... | ||
126 | int (*)(void *, int), int (*)(void *), int); |
126 | int (*)(void *, int), int (*)(void *), int); |
127 | extern void slab_cache_destroy(slab_cache_t *); |
127 | extern void slab_cache_destroy(slab_cache_t *); |
128 | 128 | ||
129 | extern void * slab_alloc(slab_cache_t *, int); |
129 | extern void * slab_alloc(slab_cache_t *, int); |
130 | extern void slab_free(slab_cache_t *, void *); |
130 | extern void slab_free(slab_cache_t *, void *); |
131 | extern count_t slab_reclaim(int); |
131 | extern size_t slab_reclaim(int); |
132 | 132 | ||
133 | /* slab subsytem initialization */ |
133 | /* slab subsytem initialization */ |
134 | extern void slab_cache_init(void); |
134 | extern void slab_cache_init(void); |
135 | extern void slab_enable_cpucache(void); |
135 | extern void slab_enable_cpucache(void); |
136 | 136 |