You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by sl...@apache.org on 2016/02/29 15:39:50 UTC

[2/3] cassandra git commit: Add (unofficial) support for s390x architecture in MemoryUtil

Add (unofficial) support for s390x architecture in MemoryUtil

patch by Nirav; reviewed by slebresne for CASSANDRA-11214


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

Branch: refs/heads/trunk
Commit: 8fc1b28e8320cfae71e3195954470a1edbfa6121
Parents: d7cb6f6
Author: Sylvain Lebresne <sy...@datastax.com>
Authored: Mon Feb 29 15:35:54 2016 +0100
Committer: Sylvain Lebresne <sy...@datastax.com>
Committed: Mon Feb 29 15:39:17 2016 +0100

----------------------------------------------------------------------
 src/java/org/apache/cassandra/utils/memory/MemoryUtil.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/8fc1b28e/src/java/org/apache/cassandra/utils/memory/MemoryUtil.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/utils/memory/MemoryUtil.java b/src/java/org/apache/cassandra/utils/memory/MemoryUtil.java
index 9a8f7e0..5d5d4a1 100644
--- a/src/java/org/apache/cassandra/utils/memory/MemoryUtil.java
+++ b/src/java/org/apache/cassandra/utils/memory/MemoryUtil.java
@@ -50,8 +50,10 @@ public abstract class MemoryUtil
     static
     {
         String arch = System.getProperty("os.arch");
+        // Note that s390x architecture are not officially supported and adding it here is only done out of convenience
+        // for those that want to run C* on this architecture at their own risk (see #11214)
         UNALIGNED = arch.equals("i386") || arch.equals("x86")
-                || arch.equals("amd64") || arch.equals("x86_64");
+                || arch.equals("amd64") || arch.equals("x86_64") || arch.equals("s390x");
         INVERTED_ORDER = UNALIGNED && !BIG_ENDIAN;
         try
         {