diff options
author | tedyu <yuzhihong@gmail.com> | 2016-03-29 17:16:53 -0700 |
---|---|---|
committer | Shixiong Zhu <shixiong@databricks.com> | 2016-03-29 17:16:53 -0700 |
commit | e1f6845391078726f60e760f0ea68ccf81f9eca9 (patch) | |
tree | 84646ef2a0db279e0d4842635f40048f96265614 /NOTICE | |
parent | 366cac6fb0bb5591a0463c4696f5b9de2a294022 (diff) | |
download | spark-e1f6845391078726f60e760f0ea68ccf81f9eca9.tar.gz spark-e1f6845391078726f60e760f0ea68ccf81f9eca9.tar.bz2 spark-e1f6845391078726f60e760f0ea68ccf81f9eca9.zip |
[SPARK-12181] Check Cached unaligned-access capability before using Unsafe
## What changes were proposed in this pull request?
For MemoryMode.OFF_HEAP, Unsafe.getInt etc. are used with no restriction.
However, the Oracle implementation uses these methods only if the class variable unaligned (commented as "Cached unaligned-access capability") is true, which seems to be calculated whether the architecture is i386, x86, amd64, or x86_64.
I think we should perform similar check for the use of Unsafe.
Reference: https://github.com/netty/netty/blob/4.1/common/src/main/java/io/netty/util/internal/PlatformDependent0.java#L112
## How was this patch tested?
Unit test suite
Author: tedyu <yuzhihong@gmail.com>
Closes #11943 from tedyu/master.
Diffstat (limited to 'NOTICE')
0 files changed, 0 insertions, 0 deletions