makepanda: Fix a crash on apple silicon machines related to cog battles

This commit is contained in:
DarthM 2024-12-31 15:18:10 -05:00
parent 8a58f7ece3
commit d54d17e04a
1 changed files with 5 additions and 0 deletions

View File

@ -2513,6 +2513,11 @@ def WriteConfigSettings():
# If we don't have mimalloc, use DeletedBufferChain as fallback,
# which is still more efficient than malloc.
dtool_config["USE_DELETED_CHAIN"] = '1'
# this will resolve a crash on apple silicon systems
elif GetTarget() == 'darwin':
# check for system architecture arm64
if os.uname().machine == 'arm64':
dtool_config["USE_DELETED_CHAIN"] = '1'
else:
# On other systems, the default malloc seems to be fine.
dtool_config["USE_DELETED_CHAIN"] = 'UNDEF'