Intermediatetroubleshooting
How would you detect a memory leak in a running application?
ReportedSource: GeeksforGeeks interview experience: Microsoft SDE-I, 1+ year
Quick answerFree
Watch heap/RSS over time under steady load; take and compare heap snapshots (MAT, tracemalloc, Valgrind/ASan) to find what grows and its GC roots; fix unbounded caches, unremoved listeners, unclosed resources; verify with a load test.
Detailed answer· ~160 words
Interview PrepUnlock the full answer with Interview Prep
Get a ~160-word model answer, plus 9 more Operating Systems questions.
Also in Pro (₹499 / 90 days).
+ 9 more Operating Systems questions in Interview Prep, each with the full answer.