In message <>, Mikhail Teterin writes:
>Poul-Henning Kamp once stated:
>=>Well, this is just an implementation detail, is not it? I don't
>=>mean to critisize, or anything, but such thing as "no available
>=>memory" is a fairly intuitive... Coming down, again, the malloc
>=>should return a usable memory if available and NULL if it's not.
>=>Is not this a "natural" semantics? Why can a program die because
>=>_another_ program ate up all the rest of the memory?
>=You know, this strikes me about as productive a discussion as the
>=Very very fundamental to UNIX philosophy is the maxim that it is
>=roots responsibility to configure the system right.
>I'm sorry I managed to annoy you. However, a program needs to be
>able to know if it can legally ask for more memory, right? And it
>is "very fundamental to malloc philosophy", that malloc returns
>NULL, when it can not get more memory. Which it apparently does
>now on FreeBSD, but only if the program exceeds an artificial
>datasize limit...

malloc() on FreeBSD returns NULL when it cannot allocate the memory
asked for.

If you have an example where this is not the case I would VERY
much like to see it.

Poul-Henning Kamp             FreeBSD coreteam member               "Real hackers run -current on their laptop."
FreeBSD -- It will take a long time before progress goes too far!

To Unsubscribe: send mail to
with "unsubscribe freebsd-current" in the body of the message

Reply via email to