On 19 May 2010 15:55, Elmo Todurov <[email protected]> wrote:
> On Wed, May 19, 2010 at 5:15 PM, pancake <[email protected]> wrote:
>> it's not that 'complex'. code shouldnt look uglier with this change, it's
>> just to
>> replace current allocator, which you should do, because failed mallocs must
>> die().
>
> Care to write a patch to prove your point? I must admit I've never
> written my own allocators.
Something like this?
void *
emalloc(uint size) {
void *ret = malloc(size);
if(!ret)
die("malloc", size);
return ret;
}