From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24193 invoked by alias); 12 Jul 2004 23:50:47 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 24175 invoked from network); 12 Jul 2004 23:50:46 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 12 Jul 2004 23:50:46 -0000 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i6CNoje1005557; Mon, 12 Jul 2004 19:50:46 -0400 Received: from potter.sfbay.redhat.com (potter.sfbay.redhat.com [172.16.27.15]) by int-mx2.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i6CNofw26615; Mon, 12 Jul 2004 19:50:41 -0400 Received: from redhat.com (dhcp-172-16-25-160.sfbay.redhat.com [172.16.25.160]) by potter.sfbay.redhat.com (8.11.6/8.11.6) with ESMTP id i6CNoeP07761; Mon, 12 Jul 2004 16:50:41 -0700 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 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-07/txt/msg00135.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.