Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761713AbXFEMHt (ORCPT ); Tue, 5 Jun 2007 08:07:49 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754871AbXFEMHm (ORCPT ); Tue, 5 Jun 2007 08:07:42 -0400 Received: from seahorse.shentel.net ([204.111.1.244]:50796 "EHLO seahorse.shentel.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752747AbXFEMHl (ORCPT ); Tue, 5 Jun 2007 08:07:41 -0400 Date: Tue, 5 Jun 2007 08:07:31 -0400 (EDT) From: "John Anthony Kazos Jr." To: Rene Herman cc: Christoph Lameter , Andrew Morton , Pekka Enberg , Linus Torvalds , linux-kernel@vger.kernel.org, Jeremy Fitzhardinge Subject: Re: SLUB: Return ZERO_SIZE_PTR for kmalloc(0) In-Reply-To: <466523E0.3050605@gmail.com> Message-ID: References: <84144f020706041213x1d241794u98e9b3ca29865033@mail.gmail.com> <46646747.2080803@cs.helsinki.fi> <20070604155355.bf29a3a8.akpm@linux-foundation.org> <466523E0.3050605@gmail.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=us-ascii Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 944 Lines: 19 > > Here a version of the patch that drops the WARN_ONs > > And now all that's done, how about yet another random person stepping in and > suggesting NIL or maybe NIL_PTR instead of ZERO_SIZE_PTR? > > I understand the idea is that code need not necesarily care about zero sized > allocation meaning it won't (generally) need to spell it out but it's still a > dreadful name... :-( The name says exactly what it is. It's not at all dreadful. If we're going to return a special value in the zero-size case (and in only that case) as a valid pointer instead of actually allocating one byte and treating it as zero, what we have is...a zero-size pointer. ZERO_SIZE_PTR is a pretty damn good name. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/