[Scummvm-devel] SCI mem functions
Johannes Schickel
lordhoto at gmail.com
Wed Feb 18 00:56:00 CET 2009
RafaĆ Rzepecki schrieb:
> Well, many (including myself) would argue that if malloc() fails, it _should_
> crash and it should crash hard, given there's nothing you can really do about
> it. (So IMHO if anything we should make sure it'd always crash instead of
> freezing -- and indeed on platforms where there is nothing to crash _to_ --
> perhaps there should be some kind of a wrapper to give the user some crash
> feedback. But that should really be platform-specific; I'm pretty much against
> clobbering core code with assumption that malloc could fail.)
>
If malloc (or in general any memory allocation fails) it should be tried
to do some error handling, at least a hard crash is the worst you can do
for an user. As a user I would find it pretty bad when a program crashes
without any word, just because I am out of memory.
// Johannes
More information about the Scummvm-devel
mailing list