cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmcken...@apache.org
Subject [08/10] cassandra git commit: Merge branch 'cassandra-3.0' into cassandra-3.7
Date Mon, 09 May 2016 00:34:40 GMT
Merge branch 'cassandra-3.0' into cassandra-3.7


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

Branch: refs/heads/cassandra-3.7
Commit: a8a3a7338a8fa2380fab6ad23057ce03aa4dc68f
Parents: 02f8725 ecb4ae8
Author: Josh McKenzie <josh.mckenzie@datastax.com>
Authored: Sun May 8 20:32:55 2016 -0400
Committer: Josh McKenzie <josh.mckenzie@datastax.com>
Committed: Sun May 8 20:32:55 2016 -0400

----------------------------------------------------------------------
 .../apache/cassandra/utils/memory/NativeAllocator.java    | 10 ++++++++++
 .../org/apache/cassandra/utils/memory/SlabAllocator.java  |  6 +++---
 2 files changed, 13 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/a8a3a733/src/java/org/apache/cassandra/utils/memory/NativeAllocator.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/utils/memory/NativeAllocator.java
index 6acf6c6,4857f34..5bdaf08
--- a/src/java/org/apache/cassandra/utils/memory/NativeAllocator.java
+++ b/src/java/org/apache/cassandra/utils/memory/NativeAllocator.java
@@@ -24,10 -24,22 +24,20 @@@ import java.util.concurrent.Semaphore
  import java.util.concurrent.atomic.AtomicInteger;
  import java.util.concurrent.atomic.AtomicReference;
  
 -import org.apache.cassandra.config.CFMetaData;
 -import org.apache.cassandra.db.DecoratedKey;
 -import org.apache.cassandra.db.NativeDecoratedKey;
 -import org.apache.cassandra.db.rows.Row;
 +import org.apache.cassandra.db.*;
 +import org.apache.cassandra.db.rows.*;
  import org.apache.cassandra.utils.concurrent.OpOrder;
  
+ /**
+  * This NativeAllocator uses global slab allocation strategy
+  * with slab size that scales exponentially from 8kb to 1Mb to
+  * serve allocation of up to 128kb.
+  * <p>
+  * </p>
+  * The slab allocation reduces heap fragmentation from small
+  * long-lived objects.
+  *
+  */
  public class NativeAllocator extends MemtableAllocator
  {
      private final static int MAX_REGION_SIZE = 1 * 1024 * 1024;

http://git-wip-us.apache.org/repos/asf/cassandra/blob/a8a3a733/src/java/org/apache/cassandra/utils/memory/SlabAllocator.java
----------------------------------------------------------------------


Mime
View raw message