[ 
https://issues.apache.org/jira/browse/LANG-1145?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15577936#comment-15577936
 ] 

Bruno P. Kinoshita commented on LANG-1145:
------------------------------------------

Interesting.

For Linux, the StackOverflow snippet suggests the following for identifying a 
64 bits JVM in some operating system.

{code}
is64bit = (System.getProperty("os.arch").indexOf("64") != -1);
{code}

Wile Apache Spark's code uses the following.

{code}
val arch = System.getProperty("os.arch")
is64bit = arch.contains("64") || arch.contains("s390x")
{code}

Which seems like is looking for the Z/OS 64 bits Linux too. Probably better to 
base the work on Apache Spark's existing code for the 64 bit check in 
SystemUtils.

Also important to note that we must make it clear that the method would check 
64 bit in the JVM, not in the operating system (see [this 
post|http://mark.koli.ch/javas-osarch-system-property-is-the-bitness-of-the-jre-not-the-operating-system]
 for more).

Cheers
Bruno 


> 64 bit check in SystemUtils
> ---------------------------
>
>                 Key: LANG-1145
>                 URL: https://issues.apache.org/jira/browse/LANG-1145
>             Project: Commons Lang
>          Issue Type: Improvement
>          Components: lang.*
>            Reporter: Gabor Liptak
>            Priority: Minor
>
> Add is64bit method to SystemUtils.java
> http://stackoverflow.com/a/2269242/304690 for Windows snippet and
> https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/util/SizeEstimator.scala
>  for zOS snippet



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to