Re: [dev] dmenu_path rewrite in C

From: Anselm R Garbe <garbeam_AT_gmail.com>
Date: Wed, 19 May 2010 16:02:54 +0100

On 19 May 2010 15:55, Elmo Todurov <todurov_AT_gmail.com> wrote:
> On Wed, May 19, 2010 at 5:15 PM, pancake <pancake_AT_youterm.com> 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;
}
Received on Wed May 19 2010 - 15:02:54 UTC

This archive was generated by hypermail 2.2.0 : Wed May 19 2010 - 15:12:02 UTC