malloc does not return null when out of memory
Kris Kennaway
kris at obsecurity.org
Thu Jul 24 00:09:40 PDT 2003
On Wed, Jul 23, 2003 at 11:44:11PM -0400, Mike Tancsa wrote:
> At 08:15 PM 7/23/2003 -0700, Kris Kennaway wrote:
> >On Wed, Jul 23, 2003 at 01:34:27PM -0400, Gabor wrote:
> >
> >> Here is the tail end of the output. It dies when trying to poke at
> >> the memory using memset. If I just malloc without the memset, it
> >> never even dies.
> >
> >Ah, the annual "memory overcommit" thread. I thought we were overdue
> >for one.
>
>
> But why does the man page for malloc (3) say,
>
> If malloc() fails, a NULL pointer is returned.
Words fail me.
Kris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20030724/599910c1/attachment.bin
More information about the freebsd-stable
mailing list