I have a node app that is slowing down with time. Reading that https://hacks.mozilla.org/2012/11/tracking-down-memory-leaks-in-node-js-a-node-js-holiday-season/ it seems that I've a memory leak and the v8 gc is slowing down my app. So I've tried node-memwatch but the relevant result is
{
what: 'Native',
size_bytes: 18853040,
size: '17.98 mb',
'+': 2247,
'-': 116
},
But I don't know what to search in my code base. I think native referers to native v8 functiuns but I'm locked here.
So if we ever have experimented that thank you for your answers.
As stated in the v8 code comments Native means a "Native object (not from V8 heap)".
Further research led me to this definition:
Native objects are everything else which is not in the JavaScript heap. Native object, in contrast to heap object, is not managed by the V8 garbage collector throughout it’s lifetime, and can only be accessed from JavaScript using its JavaScript wrapper object.
A good thing to notice from the last link is that it mentions Strings can be stored either in the VM heap or in a wrapper object. In its second form these wrappers are created "for accessing external storage where, for example, script sources and other content that is received from the Web is stored".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With