ninja fix 7882
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/97c54c50 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/97c54c50 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/97c54c50 Branch: refs/heads/trunk Commit: 97c54c50c97235e536472a05feed471b0a273a74 Parents: bda3258 Author: Benedict Elliott Smith <bened...@apache.org> Authored: Wed Jan 28 22:41:46 2015 +0000 Committer: Benedict Elliott Smith <bened...@apache.org> Committed: Wed Jan 28 22:41:46 2015 +0000 ---------------------------------------------------------------------- src/java/org/apache/cassandra/utils/memory/NativeAllocator.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/97c54c50/src/java/org/apache/cassandra/utils/memory/NativeAllocator.java ---------------------------------------------------------------------- diff --git a/src/java/org/apache/cassandra/utils/memory/NativeAllocator.java b/src/java/org/apache/cassandra/utils/memory/NativeAllocator.java index 0e15ed2..272a4c2 100644 --- a/src/java/org/apache/cassandra/utils/memory/NativeAllocator.java +++ b/src/java/org/apache/cassandra/utils/memory/NativeAllocator.java @@ -104,6 +104,9 @@ public class NativeAllocator extends MemtableAllocator public long allocate(int size, OpOrder.Group opGroup) { assert size >= 0; + offHeap().allocate(size, opGroup); + // satisfy large allocations directly from JVM since they don't cause fragmentation + // as badly, and fill up our regions quickly if (size > MAX_CLONED_SIZE) return allocateOversize(size, opGroup); @@ -150,7 +153,6 @@ public class NativeAllocator extends MemtableAllocator { // satisfy large allocations directly from JVM since they don't cause fragmentation // as badly, and fill up our regions quickly - offHeap().allocate(size, opGroup); Region region = new Region(allocator.allocate(size), size); regions.add(region);