From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Tue, 20 May 2008 12:08:14 -0700 (PDT) From: Christoph Lameter Subject: Re: [PATCH] nommu: Push kobjsize() slab-specific logic down to ksize(). In-Reply-To: <1211310023.18026.210.camel@calx> Message-ID: References: <20080520095935.GB18633@linux-sh.org> <2373.1211296724@redhat.com> <1211307820.18026.190.camel@calx> <1211310023.18026.210.camel@calx> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mm@kvack.org Return-Path: To: Matt Mackall Cc: David Howells , Paul Mundt , Pekka Enberg , linux-mm@kvack.org List-ID: On Tue, 20 May 2008, Matt Mackall wrote: > > Remove kobjsize completely and replace with calls to ksize? Callers must > > not call ksize() on non slab objects. > > What'd you think of my idea of adding WARN_ONs to SLAB and SLUB for > these cases? That is, warn whenever ksize() gets a non-kmalloced > address? How would that work given that both SLUB and SLOB forward >4k allocs to the page allocator? So any compound page allocation may be a slab allocation. Is there some way to distinguish between a allocations of the page allocator and a slab alloc? -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org