From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 827 invoked by alias); 10 Jul 2004 03:26:16 -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 805 invoked from network); 10 Jul 2004 03:26:15 -0000 Received: from unknown (HELO tisch.mail.mindspring.net) (207.69.200.157) by sourceware.org with SMTP; 10 Jul 2004 03:26:15 -0000 Received: from user-119a90a.biz.mindspring.com ([66.149.36.10] helo=berman.michael-chastain.com) by tisch.mail.mindspring.net with esmtp (Exim 3.33 #1) id 1Bj8VB-0000Xc-00; Fri, 09 Jul 2004 23:26:13 -0400 Received: by berman.michael-chastain.com (Postfix, from userid 502) id 15A4D4B104; Fri, 9 Jul 2004 23:26:23 -0400 (EDT) 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-07/txt/msg00096.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