From: Wolfram Gloger <Wolfram.Gloger@Dent.MED.Uni-Muenchen.DE>
Subject: Re: Doug Lea's malloc adapted for 64bit, needs testing [w/ fix]
Date: Sat, 8 Jun 1996 17:43:19 +0200 [thread overview]
Message-ID: <199606081543.RAA13688@md.dent.med.uni-muenchen.de> (raw)
In-Reply-To: <199606072205.PAA01642@koala.azstarnet.com>
Hi,
I think I've found the problem you reported (I didn't realize size_t
was unsigned 64bit on the Alpha). The fix for the version most people
have downloaded is:
--- malloc-64.c~ Sat Jun 8 14:31:04 1996
+++ malloc-64.c Sat Jun 8 17:16:49 1996
@@ -1138,7 +1138,7 @@
/* bin<->block macros */
-#define idx2binblock(ix) (1 << (ix / BINBLOCKWIDTH))
+#define idx2binblock(ix) ((size_t)1 << (ix / BINBLOCKWIDTH))
#define mark_binblock(ii) (binblocks |= idx2binblock(ii))
#define clear_binblock(ii) (binblocks &= ~(idx2binblock(ii)))
(I have also corrected this in the anon. ftp directory.)
Many thanks to Marvin Wu who provided me with a test account on an
Alpha system !
It should work fine now on 64bit, but due to the 8-byte size_t all
allocations of less than 32byte will occupy a full 32byte chunk. In
practice, this may be intolerable. Doug Lea mentioned plans to handle
such very small chunks specially -- maybe something will be hacked in
over the summer.
Regards,
Wolfram.
parent reply other threads:[~1996-06-08 15:43 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <199606072205.PAA01642@koala.azstarnet.com>]
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox