[Bug 1730] Change malloc(0) behavior to match FreeBSD and Linux
bugzilla-daemon at rtems.org
bugzilla-daemon at rtems.org
Tue Mar 1 07:27:31 UTC 2011
https://www.rtems.org/bugzilla/show_bug.cgi?id=1730
Chris Johns <chrisj at rtems.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |chrisj at rtems.org
--- Comment #16 from Chris Johns <chrisj at rtems.org> 2011-03-01 01:27:29 CST ---
(In reply to comment #2)
> I am very opposed to this change and don't see any reason to change something.
I support Ralf and oppose any change.
I checked the FreeBSD man page and the malloc code. FreeBSD allows malloc to be
configured via /etc/malloc.conf at the system level and also via the
environment using MALLOC_OPTIONS. The 'V' option causes malloc to return a NULL
pointer rather than the default behaviour of allocating a 1 byte. Any code in
FreeBSD that cannot handle both cases is broken. Also the C FAQ covers the
topic with http://c-faq.com/ansi/malloc0.html. I agree with the comment in the
FAQ.
--
Configure bugmail: https://www.rtems.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.
More information about the bugs
mailing list