Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758205AbXFDQWR (ORCPT ); Mon, 4 Jun 2007 12:22:17 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756421AbXFDQWH (ORCPT ); Mon, 4 Jun 2007 12:22:07 -0400 Received: from nz-out-0506.google.com ([64.233.162.228]:32266 "EHLO nz-out-0506.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756221AbXFDQWF (ORCPT ); Mon, 4 Jun 2007 12:22:05 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=IFO1Sdy4WE8IpgcVxgmKKRJV7FmBHHzEbn7Hc8KEJZikGsZqZtf3mgnAkaXrZBjEMaWXPpR5BIOoyz30F7nh6L3XXCY0BlPbuH9TGDIRU+X2AKIA8ItiKIaxOds3M96uvEVlE4htyImZCvdApqHq2P/i/5xPTPFCdNpREWdA0LU= Message-ID: <84144f020706040922v56cb10eg5a730b4abe9d5251@mail.gmail.com> Date: Mon, 4 Jun 2007 19:22:03 +0300 From: "Pekka Enberg" To: "Christoph Lameter" Subject: Re: SLUB: Return ZERO_SIZE_PTR for kmalloc(0) Cc: "Andrew Morton" , linux-kernel@vger.kernel.org, torvalds@linux-foundation.org, jeremy@goop.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20070601204141.f84ad72f.akpm@linux-foundation.org> <20070601213117.1178e8e0.akpm@linux-foundation.org> <84144f020706040808t4882f961t80b8d8eb145bfa50@mail.gmail.com> X-Google-Sender-Auth: 1f535dc7d853169b Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 618 Lines: 12 On 6/4/07, Christoph Lameter wrote: > We are doing that right now. The problem is that people keep storing stuff > in memory allocated with kmalloc(0). Ok, makes sense. I guess I might as well throw my suggestion in the mix. Lets create a new kmalloc cache for zero-length objects where object size is zero but there are regular red-zones on both sides. - 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/