cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject [10/14] git commit: use long math for long values
Date Mon, 22 Apr 2013 14:43:11 GMT
use long math for long values


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/8bb5487e
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/8bb5487e
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/8bb5487e

Branch: refs/heads/trunk
Commit: 8bb5487eab3d91398c6a8f1f3d78b6a41aae697d
Parents: 7d36c1e
Author: Dave Brosius <dbrosius@apache.org>
Authored: Sun Apr 21 22:53:49 2013 -0400
Committer: Dave Brosius <dbrosius@apache.org>
Committed: Sun Apr 21 22:53:49 2013 -0400

----------------------------------------------------------------------
 .../org/apache/cassandra/utils/SlabAllocator.java  |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/8bb5487e/src/java/org/apache/cassandra/utils/SlabAllocator.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/utils/SlabAllocator.java b/src/java/org/apache/cassandra/utils/SlabAllocator.java
index 24a2f65..4c6c0b6 100644
--- a/src/java/org/apache/cassandra/utils/SlabAllocator.java
+++ b/src/java/org/apache/cassandra/utils/SlabAllocator.java
@@ -115,7 +115,7 @@ public class SlabAllocator extends Allocator
      */
     public long getMinimumSize()
     {
-        return unslabbed.get() + (regionCount - 1) * REGION_SIZE;
+        return unslabbed.get() + (regionCount - 1) * (long)REGION_SIZE;
     }
 
     /**
@@ -123,7 +123,7 @@ public class SlabAllocator extends Allocator
      */
     public long getMaximumSize()
     {
-        return unslabbed.get() + regionCount * REGION_SIZE;
+        return unslabbed.get() + regionCount * (long)REGION_SIZE;
     }
 
     /**


Mime
View raw message