diff --git a/scripts/tools/zap/generate.py b/scripts/tools/zap/generate.py index b979573682f017..0da60bd176a9cc 100755 --- a/scripts/tools/zap/generate.py +++ b/scripts/tools/zap/generate.py @@ -370,8 +370,9 @@ def main(): if cmdLineArgs.runBootstrap: subprocess.check_call(getFilePath("scripts/tools/zap/zap_bootstrap.sh"), shell=True) - # The maximum memory usage is over 4GB (#15620) - os.environ["NODE_OPTIONS"] = "--max-old-space-size=8192" + # on 64 bit systems, allow maximum memory usage to go over 4GB (#15620) + if sys.maxsize >= 2**32: + os.environ["NODE_OPTIONS"] = "--max-old-space-size=8192" # `zap-cli` may extract things into a temporary directory. ensure extraction # does not conflict.