malloc does not return null when out of memory

Rostislav Krasny rosti_bsd at yahoo.com
Thu Jul 24 14:38:19 PDT 2003


> > The Single UNIX Specification extends malloc() function, a little.
> > Following URL is of the manual page of this function:
> > http://www.opengroup.org/onlinepubs/007904975/functions/malloc.html
> > Read "ERRORS" and "Issue 6" sections. Should FreeBSD be conformed
to
> > this standard?
>
> FreeBSD malloc is POSIX/SUSv3 compliant.  It returns NULL and sets
> errno to ENOMEM if insufficient storage space is available.

Then why Gabor <gabor at vmunix.com> reported that it doesn't return NULL
when insufficient storage space is available? Am I misunderstand something?

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com


More information about the freebsd-stable mailing list