public inbox for rda@sourceware.org
 help / color / mirror / Atom feed
From: mec.gnu@mindspring.com (Michael Elizabeth Chastain)
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
Date: Sat, 10 Jul 2004 03:26:00 -0000	[thread overview]
Message-ID: <20040710032623.15A4D4B104@berman.michael-chastain.com> (raw)

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

             reply	other threads:[~2004-07-10  3:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-10  3:26 Michael Elizabeth Chastain [this message]
2004-07-12 23:50 ` Michael Snyder
  -- strict thread matches above, loose matches on Subject: below --
2004-07-09 21:39 Michael Snyder

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040710032623.15A4D4B104@berman.michael-chastain.com \
    --to=mec.gnu@mindspring.com \
    --cc=binutils@sources.redhat.com \
    --cc=cagney@gnu.org \
    --cc=gdb-patches@sources.redhat.com \
    --cc=msnyder@redhat.com \
    --cc=rda@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).