This commit is contained in:
Dmitry Samersoff 2016-12-20 11:19:36 +00:00
commit 40d84ade8a

View File

@ -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) {