Add MallocNanoZone=1 on macOS for Blender

This commit is contained in:
Luke Street 2020-04-15 00:44:09 -04:00
parent 54ca8e4f86
commit a22a5e9473
1 changed files with 5 additions and 0 deletions

View File

@ -453,6 +453,11 @@ Connection::Connection(int verbosityLevel) {
std::string writefds = fmt::format(FMT_STRING("{}"), m_readpipe[1]);
std::string vLevel = fmt::format(FMT_STRING("{}"), verbosityLevel);
#ifdef __APPLE__
// Undocumented flag that makes Blender not crash ¯\_(ツ)_/¯
setenv("MallocNanoZone", "1", 1);
#endif
/* Try user-specified blender first */
if (blenderBin) {
execlp(blenderBin, blenderBin, "--background", "-P", blenderShellPath.c_str(), "--", readfds.c_str(),