From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24370 invoked by alias); 12 Jul 2004 23:50:47 -0000 Mailing-List: contact rda-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Post: List-Help: , Sender: rda-owner@sources.redhat.com Received: (qmail 24175 invoked from network); 12 Jul 2004 23:50:46 -0000 Message-ID: <40F323D0.8020307@redhat.com> Date: Mon, 12 Jul 2004 23:50:00 -0000 From: Michael Snyder Organization: Red Hat, Inc. User-Agent: Mozilla/5.0 (X11; U; Linux i686; es-ES; rv:1.4.2) Gecko/20040301 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Michael Elizabeth Chastain CC: binutils@sources.redhat.com, cagney@gnu.org, gdb-patches@sources.redhat.com, rda@sources.redhat.com Subject: Re: [RFA] rda/samples: improve memory allocation References: <20040710032623.15A4D4B104@berman.michael-chastain.com> In-Reply-To: <20040710032623.15A4D4B104@berman.michael-chastain.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-q3/txt/msg00006.txt.bz2 Michael Elizabeth Chastain wrote: > Michael Snyder writes: > > + #define ALLOC_UNIT 0x1000; > > Oops, extra semicolon! > > + #define alloc_roundup(LEN) ((LEN / ALLOC_UNIT) + ALLOC_UNIT) > > This looks like it's missing a multiplication again by ALLOC_UNIT. > Say, if LEN is 0x3000, then alloc_roundup(LEN) comes out to 0x1003 > which seems weird. > > Perhaps: > > #define alloc_roundup(LEN) ((((LEN)+ALLOC_UNIT-1) / ALLOC_UNIT) * ALLOC_UNIT) > > Or I dunno exactly what you want, but that definition doesn't look > right. Looks like a missing call to alloc_coffee somewhere ... Mmm, for some reason, I've always been roundup-challenged. Withdrawn and re-submitted, with your suggestions. Thanks. [msnyder@dhcp-172-16-25-160 samples]$ make coffee make: *** No rule to make target `coffee'. Stop.