You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by vi...@apache.org on 2012/11/27 09:44:03 UTC
git commit: CompactionSerializerTest failure fix Patch by vijay
reviewed by jbellis for CASSANDRA-4995
Updated Branches:
refs/heads/trunk e3f48f2e3 -> ba5fe9b33
CompactionSerializerTest failure fix
Patch by vijay reviewed by jbellis for CASSANDRA-4995
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/ba5fe9b3
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/ba5fe9b3
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/ba5fe9b3
Branch: refs/heads/trunk
Commit: ba5fe9b33f1be3c93700018987aefbd4a1a03b13
Parents: e3f48f2
Author: Vijay Parthasarathy <vi...@gmail.com>
Authored: Tue Nov 27 00:43:52 2012 -0800
Committer: Vijay Parthasarathy <vi...@gmail.com>
Committed: Tue Nov 27 00:43:52 2012 -0800
----------------------------------------------------------------------
.../cassandra/io/util/JEMallocAllocator.java | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/ba5fe9b3/src/java/org/apache/cassandra/io/util/JEMallocAllocator.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/io/util/JEMallocAllocator.java b/src/java/org/apache/cassandra/io/util/JEMallocAllocator.java
index 45057f2..07d19fe 100644
--- a/src/java/org/apache/cassandra/io/util/JEMallocAllocator.java
+++ b/src/java/org/apache/cassandra/io/util/JEMallocAllocator.java
@@ -29,15 +29,20 @@ public class JEMallocAllocator implements IAllocator
void free(long pointer);
}
- private static final JEMLibrary instance = (JEMLibrary) Native.loadLibrary("jemalloc", JEMLibrary.class);
+ private final JEMLibrary library;
+
+ public JEMallocAllocator()
+ {
+ library = (JEMLibrary) Native.loadLibrary("jemalloc", JEMLibrary.class);
+ }
public long allocate(long size)
{
- return instance.malloc(size);
+ return library.malloc(size);
}
public void free(long peer)
{
- instance.free(peer);
+ library.free(peer);
}
}