From mboxrd@z Thu Jan 1 00:00:00 1970 Subject: Re: [RFC PATCH] type safe allocator References: From: Andi Kleen Date: 01 Aug 2007 13:34:23 +0200 In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-linux-mm@kvack.org Return-Path: To: Miklos Szeredi Cc: andi@firstfloor.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, akpm@linux-foundation.org, torvalds@linux-foundation.org List-ID: Miklos Szeredi writes: > > #define k_new(type, flags) ((type *) kmalloc(sizeof(type), flags)) The cast doesn't make it more safe in any way (at least as long as you don't care about portability to C++; the kernel doesn't) -Andi -- 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