*
* - Support PAGE_ALLOC_DEBUG. Should be easy to do.
*
- * - SLAB_DEBUG_INITIAL is not supported but I have never seen a use of
- * it.
- *
* - Variable sizing of the per node arrays
*/
#endif
-/*
- * Flags from the regular SLAB that SLUB does not support:
- */
-#define SLUB_UNIMPLEMENTED (SLAB_DEBUG_INITIAL)
-
/*
* Mininum number of partial slabs. These will be left on the partial
* lists even if they are empty. kmem_cache_shrink may reclaim them.
init_tracking(s, object);
}
- if (unlikely(s->ctor)) {
- int mode = SLAB_CTOR_CONSTRUCTOR;
-
- if (!(s->flags & __GFP_WAIT))
- mode |= SLAB_CTOR_ATOMIC;
-
- s->ctor(object, s, mode);
- }
+ if (unlikely(s->ctor))
+ s->ctor(object, s, SLAB_CTOR_CONSTRUCTOR);
}
static struct page *new_slab(struct kmem_cache *s, gfp_t flags, int node)
void *last;
void *p;
- if (flags & __GFP_NO_GROW)
- return NULL;
-
BUG_ON(flags & ~(GFP_DMA | GFP_LEVEL_MASK));
if (flags & __GFP_WAIT)
s->flags = flags;
s->align = align;
- BUG_ON(flags & SLUB_UNIMPLEMENTED);
-
/*
* The page->offset field is only 16 bit wide. This is an offset
* in units of words from the beginning of an object. If the slab