Project

General

Profile

Support #2700

Memory leaks diagnose

Added by Anonymous almost 9 years ago. Updated almost 9 years ago.

Status:
Feedback
Priority:
Normal
Assignee:
Target version:
-
Start date:
02/21/2014
Due date:
% Done:

0%

Estimated time:

Description

Is there any tool for diagnosing memory leaks, are yot using any?

I performed load test 1000 requests per 5 seconds, this test wa repeated 5 times.

My Wt FastCgi app started at 10MB went up to 240MB.

I have waited for some hours and it is still 240MB.

What might be wrong?

#1

Updated by Wim Dumon almost 9 years ago

  • Status changed from New to Feedback

We use valgrind to verify that Wt (or the applications we develop with Wt) has no memory leaks. On a clean shutdown of the Wt application (with fcgi this is done e.g. by shutting down the http server), Wt will invoke the destructor of all application objects, free all other memory it allocated, and you should have no leaks in the valgrind report (some of the dependency libraries may have a small leak, but that should be constant and not grow with the number of sessions, ...).

Looking at the output of top or ps is a flawed way to check if memory is freed or not. Many implementations of malloc() cache memory for later use, so they don't return it to the OS when you call free(). Even without memory leaks, top may report a significant memory use.

BR,

Wim.

#2

Updated by Koen Deforche almost 9 years ago

  • Assignee set to Wim Dumon

Also available in: Atom PDF