From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 825 invoked by alias); 10 Jul 2004 03:26:16 -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 805 invoked from network); 10 Jul 2004 03:26:15 -0000 To: binutils@sources.redhat.com, cagney@gnu.org, gdb-patches@sources.redhat.com, msnyder@redhat.com, rda@sources.redhat.com Subject: Re: [RFA] rda/samples: improve memory allocation Message-Id: <20040710032623.15A4D4B104@berman.michael-chastain.com> Date: Sat, 10 Jul 2004 03:26:00 -0000 From: mec.gnu@mindspring.com (Michael Elizabeth Chastain) X-SW-Source: 2004-q3/txt/msg00004.txt.bz2 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 ... Michael C