From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Wed, 29 Nov 2006 20:28:23 -0800 (PST) From: Christoph Lameter Subject: Re: [RFC] Extract kmalloc.h and slob.h from slab.h In-Reply-To: <456E5B9C.6030504@yahoo.com.au> Message-ID: References: <20061129082650.GB12734@infradead.org> <456D4722.2010202@yahoo.com.au> <456E3ACE.4040804@yahoo.com.au> <456E4A53.2030000@yahoo.com.au> <456E53B2.9020701@yahoo.com.au> <456E5B9C.6030504@yahoo.com.au> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mm@kvack.org Return-Path: To: Nick Piggin Cc: Christoph Hellwig , akpm@osdl.org, linux-mm@kvack.org, Pekka Enberg , mpm@selenic.com, Manfred Spraul List-ID: On Thu, 30 Nov 2006, Nick Piggin wrote: > I see, I didn't realise kmalloc was different as well. I guess you could > follow the same approach. Probably don't bother splitting it, and just > move the kmalloc definitions to slab_defs.h / slob_defs.h? kmalloc implementation are very different. We could segment slab.h into a a part for the kmem_cache_* API. All slab allocators need to provide that API and if they do not need a certain function will have to define a stub in a c file. Then we will have a portion like this that redirects to the allocator specific kmalloc implementation: #ifdef CONFIG_SLOB #include #else #ifdef CONFIG_SLUB #include #else #include #endif #endif Following this part generic kmalloc related definitions kzalloc kcalloc etc. ? -- 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