[Scummvm-devel] Fwd: SCI mem functions

Vicent Marti tanoku at gmail.com
Wed Feb 18 01:50:37 CET 2009


Well, how exactly would you recover from running out of memory in a
portable device?

I myself also believe that checking the return of malloc() is rather
pointless. Instead we should be focusing on dynamic memory
optimization, together with some memory profiling, to make sure that
we never run out of memory on platforms where that's an issue.

Cheers,
Vicent Martí



2009/2/18 Johannes Schickel <lordhoto at gmail.com>:
> 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
>
>
> ------------------------------------------------------------------------------
> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
> -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
> -Strategies to boost innovation and cut costs with open source participation
> -Receive a $600 discount off the registration fee with the source code: SFAD
> http://p.sf.net/sfu/XcvMzF8H
> _______________________________________________
> Scummvm-devel mailing list
> Scummvm-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/scummvm-devel
>




More information about the Scummvm-devel mailing list