摘要 |
A system detects memory leaks in Node.JS applications. The memory leaks are associated with lines of code rather than particular objects. Lines of code associated with a memory leak is identified by object allocation tracking. Object allocation for lines of code is tracked. A heap snapshot may be captured at the same time at which the object allocation occurs. The results of the object allocation are processed, including removal of objects cleaned up by garbage collection. Objects remaining in the object allocation results are then searched for the end heap snapshot. For objects found in the heap snapshot, the corresponding lines of code that generate the objects are reported to administrators the application. |