Are you using Chrome? Chrome DevTools has built-in functionality for
taking, inspecting and comparing heap snapshots.
If you are not using Chrome, you can programmatically create a heap
snapshot with v8::HeapProfiler::TakeHeapSnapshot() and write it to
disk with v8::HeapSnapshot::Serialize(). Make sure you give the file
a .heapsnapshot extension, or Chrome will refuse to load it.
If you need ready-to-paste example code, please see
https://github.com/bnoordhuis/node-heapdump :-)