[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.61.0703230237390.9555@yvahk01.tjqt.qr>
Date: Fri, 23 Mar 2007 02:38:25 +0100 (MET)
From: Jan Engelhardt <jengelh@...ux01.gwdg.de>
To: Stephane Eranian <eranian@....hp.com>
cc: linux-kernel@...r.kernel.org, akpm@...ux-foundation.org, ak@...e.de
Subject: Re: kmalloc() with size zero
On Mar 22 2007 16:18, Stephane Eranian wrote:
>
>Hello,
>
>I ran into an issue with perfmon where I ended up calling
>kmalloc() with a size of zero. To my surprise, this did
>not return NULL but a valid data address.
>
>I am wondering if this is a property of kmalloc() or simply
>a bug. It is the case that the __kmalloc() code does not
>check for zero size.
I'd say "feature", glibc's malloc also returns an address on malloc(0).
Jan
--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists