Skip to content

Commit

Permalink
[SPARK-17127] Make unaligned access in unsafe available for AArch64
Browse files Browse the repository at this point in the history
## # What changes were proposed in this pull request?

From the spark of version 2.0.0 , when MemoryMode.OFF_HEAP is set , whether the architecture supports unaligned access or not is checked. If the check doesn't pass, exception is raised.

We know that AArch64 also supports unaligned access , but now only i386, x86, amd64, and X86_64 are included.

I think we should include aarch64 when performing the check.

## How was this patch tested?

Unit test suite

Author: Richael <[email protected]>

Closes apache#14700 from yimuxi/zym_change_unsafe.
  • Loading branch information
richael02 authored and srowen committed Aug 22, 2016
1 parent b2074b6 commit 083de00
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public final class Platform {
// We at least know x86 and x64 support unaligned access.
String arch = System.getProperty("os.arch", "");
//noinspection DynamicRegexReplaceableByCompiledPattern
_unaligned = arch.matches("^(i[3-6]86|x86(_64)?|x64|amd64)$");
_unaligned = arch.matches("^(i[3-6]86|x86(_64)?|x64|amd64|aarch64)$");
}
unaligned = _unaligned;
}
Expand Down

0 comments on commit 083de00

Please sign in to comment.