I'm facing a memory leak, and while looking for the problem, wondered if there was some way in Node.js to find the memory allocated to a JavaScript Object. Node provides a way to find the overall heap and stack space, but I couldn't find anything in the documentation or online to find the space for a specific object.
Given the way variables work, it shouldn't be hard to write something within node to find the size, but I was wondering if something, maybe a JavaScript function, already exists to do it?
I'm facing a memory leak, and while looking for the problem, wondered if there was some way in Node.js to find the memory allocated to a JavaScript Object. Node provides a way to find the overall heap and stack space, but I couldn't find anything in the documentation or online to find the space for a specific object.
Given the way variables work, it shouldn't be hard to write something within node to find the size, but I was wondering if something, maybe a JavaScript function, already exists to do it?
Share Improve this question edited Feb 12, 2011 at 2:36 Vanwaril asked Feb 11, 2011 at 17:29 VanwarilVanwaril 7,5787 gold badges35 silver badges47 bronze badges 2- 1 There's some kind of memory management plugin for node.js. Maybe in the v8 toolchain – Raynos Commented Feb 11, 2011 at 17:35
- Chips. I think I pressed the wrong button. This did not deserve down-vote, but upvote! – Alfred Commented Dec 31, 2012 at 1:42
1 Answer
Reset to default 5There's Node-Profiler you could use to take 2 heap snapshot and search for large objects by paring their values.
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745100962a4611270.html
评论列表(0条)