Troubleshooting
Working with Extremely Large Files
JSDefender keeps the source files to protect and all working information in the memory. When you work with very large files (their total size exceeds about 8 MB), you may get a "JavaScript heap out of memory" error message.
By default, Node sets the maximum available heap size on 32-bit platforms to 700 MB, on 64-bit platforms to 1,400 MB — and it may be too low for your enormous files.
You can increase the heap size by setting the NODE_OPTION
environment variable higher than the default. For example, if you have 8 GB RAM in your machine, you may dedicate 4 GB to the Node process with setting the value of NODE_OPTION
to --max_old_space_size=4096
. The value following --max_old_space_size
is given in megabytes.