You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by cloud-fan <gi...@git.apache.org> on 2018/02/06 12:28:58 UTC
[GitHub] spark pull request #19077: [SPARK-21860][core]Improve memory reuse for heap ...
Github user cloud-fan commented on a diff in the pull request:
https://github.com/apache/spark/pull/19077#discussion_r166280387
--- Diff: common/unsafe/src/main/java/org/apache/spark/unsafe/array/ByteArrayMethods.java ---
@@ -40,6 +40,15 @@ public static int roundNumberOfBytesToNearestWord(int numBytes) {
}
}
+ public static long roundNumberOfBytesToNearestWord(long numBytes) {
+ long remainder = numBytes & 0x07; // This is equivalent to `numBytes % 8`
--- End diff --
is it just `return (numBytes + 7) / 8;`?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org