...

/

More Tools and Features for Debugging Leaks

More Tools and Features for Debugging Leaks

Learn more tricks and tactics to go after memory leaks.

As previously mentioned, each program handles memory differently, and memory leaks can happen in many situations and contexts. So, it is good to have a variety of tools and options to debug memory leaks. In this lesson, we’ll discuss some more ideas to tackle memory leaks.

Memory monitoring

Monitoring the memory usage of various processes in a product is a must in any situation. However, monitoring the graphs or charts manually and endlessly is error-prone and tedious. It is better to have a system that monitors and acts on this memory usage as much as possible. There are a variety of actions available as options when the memory usage of a process is growing:

  • Printing warnings in the logs: This is probably the weakest action possible because it does not help alleviate the issue. However, it does help later when debugging the issue with the logs to check for any correlation.

Press + to interact
  • Generating or collecting diagnostic information: This is a slightly stronger action than printing a warning in the logs. Various options, like dumping a memory profile in several platforms, can be automated. In addition, various proprietary tools could be invoked in reaction to the growth in memory usage. This helps diagnose the issue later.

  • Triggering alerts to users: In case there is not much scope to automate the collection of diagnostic information. The second best option is to intimate the user of a ...