+constexpr size_t kDefaultCapacity = 500;
+
+// Note: not thread-safe, but that's okay, as we only let one thread
+// in our signal handler at a time.
+//
+// Leak it so we don't have to worry about destruction order
+auto gSignalSafeElfCache = new SignalSafeElfCache(kDefaultCapacity);
+
+// Buffered writer (using a fixed-size buffer). We try to write only once
+// to prevent interleaving with messages written from other threads.
+//
+// Leak it so we don't have to worry about destruction order.
+auto gPrinter = new FDSymbolizePrinter(STDERR_FILENO,
+ SymbolizePrinter::COLOR_IF_TTY,
+ size_t(64) << 10); // 64KiB
+
+// Flush gPrinter, also fsync, in case we're about to crash again...
+void flush() {
+ gPrinter->flush();
+ fsyncNoInt(STDERR_FILENO);
+}
+