public inbox for
 help / color / mirror / Atom feed
From: (Michael Elizabeth Chastain)
Subject: Re: [RFA] rda/samples: improve memory allocation
Date: Sat, 10 Jul 2004 03:26:00 -0000	[thread overview]
Message-ID: <> (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.


#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:

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

  git send-email \ \ \ \ \ \ \ \

* 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).