OpenJDK / valhalla / valhalla10-old / hotspot
changeset 12453:a3b8c95d0ba5
Merge
author | dsamersoff |
---|---|
date | Tue, 20 Dec 2016 10:53:52 +0000 |
parents | e5e4011e9c30 fcef8579ef44 |
children | eba7b09fa852 |
files | |
diffstat | 1 files changed, 10 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/share/vm/logging/logFileStreamOutput.cpp Tue Dec 20 13:35:40 2016 +0300 +++ b/src/share/vm/logging/logFileStreamOutput.cpp Tue Dec 20 10:53:52 2016 +0000 @@ -29,11 +29,17 @@ #include "memory/allocation.inline.hpp" static bool initialized; -static char stdoutmem[sizeof(LogStdoutOutput)]; -static char stderrmem[sizeof(LogStderrOutput)]; +static union { + char stdoutmem[sizeof(LogStdoutOutput)]; + jlong dummy; +} aligned_stdoutmem; +static union { + char stderrmem[sizeof(LogStderrOutput)]; + jlong dummy; +} aligned_stderrmem; -LogStdoutOutput &StdoutLog = reinterpret_cast<LogStdoutOutput&>(stdoutmem); -LogStderrOutput &StderrLog = reinterpret_cast<LogStderrOutput&>(stderrmem); +LogStdoutOutput &StdoutLog = reinterpret_cast<LogStdoutOutput&>(aligned_stdoutmem.stdoutmem); +LogStderrOutput &StderrLog = reinterpret_cast<LogStderrOutput&>(aligned_stderrmem.stderrmem); LogFileStreamInitializer::LogFileStreamInitializer() { if (!initialized) {