diff options
Diffstat (limited to 'lib/slab.c')
-rw-r--r-- | lib/slab.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -197,7 +197,7 @@ static struct resclass sl_class = { slab_memsize }; -#define SL_GET_HEAD(x) ((struct sl_head *) (((uintptr_t) (x)) & ~(page_size-1))) +#define SL_GET_HEAD(x) PAGE_HEAD(x) #define SL_HEAD_CHANGE_STATE(_s, _h, _from, _to) ({ \ ASSERT_DIE(_h->state == slh_##_from); \ @@ -236,7 +236,7 @@ sl_new(pool *p, uint size) + sizeof(u32) * s->head_bitfield_len + align - 1) / align * align; - } while (s->objs_per_slab * size + s->head_size > page_size); + } while (s->objs_per_slab * size + s->head_size > (size_t) page_size); if (!s->objs_per_slab) bug("Slab: object too large"); |