In order to be able to create a heapdump just before an out of memory occurs, it's necessary to increase the heap limit. Otherwise the heapdump cannot be created. See discussion (and code) in
https://github.com/node-inspector/v8-profiler/issues/109.
These API calls are only available from Node8, so this pull request also incorporates this pull request .
I've updated the documentation and unit tests as well.
With this change i can monitor the (Full) GC's and when an out of memory seems imminent, the heap limit can be increased to allow for proper heapdump creation. For completeness the "restoreHeapLimit" function is also added.
In order to be able to create a heapdump just before an out of memory occurs, it's necessary to increase the heap limit. Otherwise the heapdump cannot be created. See discussion (and code) in https://github.com/node-inspector/v8-profiler/issues/109.
These API calls are only available from Node8, so this pull request also incorporates this pull request .
I've updated the documentation and unit tests as well.
With this change i can monitor the (Full) GC's and when an out of memory seems imminent, the heap limit can be increased to allow for proper heapdump creation. For completeness the "restoreHeapLimit" function is also added.