[Bf-committers] Some words about a strange thing named

Jorrit Tyberghein jorrit.tyberghein at gmail.com
Fri Nov 25 10:21:54 CET 2005


Hmm... Exactly how is a system that is returning null for malloc a
f*cked up system? On my linux system I have 512Megs RAM and 1Gig swap
(not an uncommon setup). Assume that I still have 300Megs free (which
is plenty) and then something does a malloc of 300 megs which fails.
How is this a f*cked up system? Code should check for failure on
memory allocation IMHO. Now in practice I realize that few programs
actually do that (Crystal Space doesn't do that either) but returning
NULL for malloc is not always indicative of your system being messed
up. It can simply be that there is not sufficient memory available for
the allocation.

Greetings,

On 11/25/05, Alexander Ewering <blender at instinctive.de> wrote:
>
> On Fri, 25 Nov 2005, Yomgui wrote:
>
> > It's not the first time that I seen some developpers saying "I never
> > check functions return... It tooks me too many time...". I totally
> > disagree that.
>
> Ton's point just is that if your system is so f*cked that it returns
> NULL for malloc, you probably have worse things to worry about than
> a crashing application. And I totally agree ;-)
>
> | alexander ewering              instinctive mediaworks
> | ae[@]instinctive[.]de   http://www[.]instinctive[.]de
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at projects.blender.org
> http://projects.blender.org/mailman/listinfo/bf-committers
>


--
Project Manager of Crystal Space (http://www.crystalspace3d.org)
and CEL (http://cel.crystalspace3d.org)
Support Crystal Space. Donate at
https://sourceforge.net/donate/index.php?group_id=649


More information about the Bf-committers mailing list