Re: kmalloc() with size zero

2007-03-29 Thread Bill Davidsen
Stephane Eranian wrote: Hi, On Sun, Mar 25, 2007 at 06:30:34PM +0200, Folkert van Heusden wrote: I'd say "feature", glibc's malloc also returns an address on malloc(0). This is implementation defined-the standard allows for return of either null or an address. Entirely for entertainment:

Re: kmalloc() with size zero

2007-03-29 Thread Bill Davidsen
Stephane Eranian wrote: Hi, On Sun, Mar 25, 2007 at 06:30:34PM +0200, Folkert van Heusden wrote: I'd say feature, glibc's malloc also returns an address on malloc(0). This is implementation defined-the standard allows for return of either null or an address. Entirely for entertainment: AIX

Re: kmalloc() with size zero

2007-03-26 Thread Stephane Eranian
Hi, On Sun, Mar 25, 2007 at 06:30:34PM +0200, Folkert van Heusden wrote: > > > I'd say "feature", glibc's malloc also returns an address on > > > malloc(0). > > > > > This is implementation defined-the standard allows for return of either > > null or an address. > > Entirely for entertainment:

Re: kmalloc() with size zero

2007-03-26 Thread Stephane Eranian
Hi, On Sun, Mar 25, 2007 at 06:30:34PM +0200, Folkert van Heusden wrote: I'd say feature, glibc's malloc also returns an address on malloc(0). This is implementation defined-the standard allows for return of either null or an address. Entirely for entertainment: AIX (5.3) returns

Re: kmalloc() with size zero

2007-03-25 Thread Folkert van Heusden
> > I'd say "feature", glibc's malloc also returns an address on > > malloc(0). > > > This is implementation defined-the standard allows for return of either > null or an address. Entirely for entertainment: AIX (5.3) returns NULL, IRIX returns a valid address. Folkert van Heusden --

Re: kmalloc() with size zero

2007-03-25 Thread Folkert van Heusden
I'd say feature, glibc's malloc also returns an address on malloc(0). This is implementation defined-the standard allows for return of either null or an address. Entirely for entertainment: AIX (5.3) returns NULL, IRIX returns a valid address. Folkert van Heusden -- MultiTail är en

Re: kmalloc() with size zero

2007-03-23 Thread Christoph Lameter
On Thu, 22 Mar 2007, Stephane Eranian wrote: > 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

Re: kmalloc() with size zero

2007-03-23 Thread Christoph Lameter
On Thu, 22 Mar 2007, Stephane Eranian wrote: 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

Re: kmalloc() with size zero

2007-03-22 Thread Vignesh Babu BM
On Fri, 2007-03-23 at 07:08 +0530, Jan Engelhardt wrote: > > On Mar 22 2007 16:18, Stephane Eranian wrote: > > > I'd say "feature", glibc's malloc also returns an address on > malloc(0). > This is implementation defined-the standard allows for return of either null or an address. > > Jan > -- >

Re: kmalloc() with size zero

2007-03-22 Thread Jan Engelhardt
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

kmalloc() with size zero

2007-03-22 Thread Stephane Eranian
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

kmalloc() with size zero

2007-03-22 Thread Stephane Eranian
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

Re: kmalloc() with size zero

2007-03-22 Thread Jan Engelhardt
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

Re: kmalloc() with size zero

2007-03-22 Thread Vignesh Babu BM
On Fri, 2007-03-23 at 07:08 +0530, Jan Engelhardt wrote: On Mar 22 2007 16:18, Stephane Eranian wrote: I'd say feature, glibc's malloc also returns an address on malloc(0). This is implementation defined-the standard allows for return of either null or an address. Jan -- - To