-
- Downloads
Slab allocators: consistent ZERO_SIZE_PTR support and NULL result semantics
Define ZERO_OR_NULL_PTR macro to be able to remove the checks from the allocators. Move ZERO_SIZE_PTR related stuff into slab.h. Make ZERO_SIZE_PTR work for all slab allocators and get rid of the WARN_ON_ONCE(size == 0) that is still remaining in SLAB. Make slub return NULL like the other allocators if a too large memory segment is requested via __kmalloc. Signed-off-by:Christoph Lameter <clameter@sgi.com> Acked-by:
Pekka Enberg <penberg@cs.helsinki.fi> Signed-off-by:
Andrew Morton <akpm@linux-foundation.org> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
Showing
- include/linux/slab.h 13 additions, 0 deletionsinclude/linux/slab.h
- include/linux/slab_def.h 12 additions, 0 deletionsinclude/linux/slab_def.h
- include/linux/slub_def.h 0 additions, 12 deletionsinclude/linux/slub_def.h
- mm/slab.c 8 additions, 5 deletionsmm/slab.c
- mm/slob.c 7 additions, 4 deletionsmm/slob.c
- mm/slub.c 16 additions, 13 deletionsmm/slub.c
- mm/util.c 1 addition, 1 deletionmm/util.c
Loading
Please register or sign in to comment