DragonFly bugs List (threaded) for 2009-05
DragonFly BSD
DragonFly bugs List (threaded) for 2009-05
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: zero-size malloc and ps: kvm_getprocs: Bad address


From: Joerg Sonnenberger <joerg@xxxxxxxxxxxxxxxxx>
Date: Sun, 24 May 2009 16:14:57 +0200
Mail-followup-to: bugs@crater.dragonflybsd.org

On Sun, May 24, 2009 at 10:26:24AM +0200, Simon 'corecode' Schubert wrote:
> I think we should make malloc(0) return a valid pointer.

For consistency, just round up malloc(0) to the minimal allocation size.
That avoids most problems with existing programs and keeps the spirit of
the standard.

Joerg



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]