Last active
April 3, 2021 20:17
-
-
Save albertywu/079fee601baeca30632c660656d7aab5 to your computer and use it in GitHub Desktop.
get max v8 heap size for node
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| echo "console.log(require('v8').getHeapStatistics())" | node - | grep heap_size_limit | |
| # both max-old-space-size and max_old_space_size work | |
| export NODE_OPTIONS="--max-old-space-size=16384" | |
| export NODE_OPTIONS="--max_old_space_size=16384" | |
| # alternatively, "node --max-old-space-size=16384 ..." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment