diff options
author | Robin Green <greenrd@greenrd.org> | 2005-06-28 14:31:22 +0000 |
---|---|---|
committer | Andrew Haley <aph@gcc.gnu.org> | 2005-06-28 14:31:22 +0000 |
commit | 832a0afe9c772000fdd1f1f545fd82c4619144f4 (patch) | |
tree | 5e92a057d6e4b4ef2e07748c2c3c2a8276f1f158 /libjava/gnu/gcj | |
parent | 7bcebb25b9bb31b27f7d1e71f01d1988d3217ac7 (diff) | |
download | gcc-832a0afe9c772000fdd1f1f545fd82c4619144f4.zip gcc-832a0afe9c772000fdd1f1f545fd82c4619144f4.tar.gz gcc-832a0afe9c772000fdd1f1f545fd82c4619144f4.tar.bz2 |
re PR libgcj/22189 (Table Full in gcj-dbtool if -m option used with smallest possible input)
2005-06-28 Robin Green <greenrd@greenrd.org>
PR java/22189
* gnu/gcj/runtime/PersistentByteMap.java (init): Fix rounding
error.
From-SVN: r101382
Diffstat (limited to 'libjava/gnu/gcj')
-rw-r--r-- | libjava/gnu/gcj/runtime/PersistentByteMap.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libjava/gnu/gcj/runtime/PersistentByteMap.java b/libjava/gnu/gcj/runtime/PersistentByteMap.java index a2b91da..fec3080 100644 --- a/libjava/gnu/gcj/runtime/PersistentByteMap.java +++ b/libjava/gnu/gcj/runtime/PersistentByteMap.java @@ -175,10 +175,10 @@ public class PersistentByteMap // We're going to make that size prime. This isn't // strictly necessary but it can't hurt. // - // We expand the size by 3/2 because the hash table is - // intolerably slow when more than 2/3 full. + // We expand the size by 3/2 and round the result because the + // hash table is intolerably slow when more than 2/3 full. - BigInteger size = new BigInteger(Integer.toString(capacity * 3/2)); + BigInteger size = new BigInteger(Integer.toString(((capacity*3)+1)/2)); BigInteger two = BigInteger.ONE.add(BigInteger.ONE); if (size.getLowestSetBit() != 0) // A hard way to say isEven() |