|
News |
|
Fedora 14 Dives Deeply into Memory Debugging |
12-02-2010 |
The gdb debugger has been extended with new commands that make it easier to track down and fix excessive memory usage within programs and libraries. This functionality was created by Fedora contributor David Malcolm, and we believe it is unique to Fedora.
The new "gdb-heap" package adds a new "heap" command to /usr/bin/gdb.
The command allows you to get a breakdown of how that process is using dynamic memory. It allows for unplanned memory usage debugging: if a process unexpectedly starts using large amounts of memory you can attach to it with gdb, and use the heap command to figure out where the memory is going. You should also be able to use it on core dumps.
This feature could be of great use to developers and system administrators: it provides a new way of analyzing how a process uses memory, without requiring advance planning.
Basic Operation: Attached to a process with gdb
$ gdb attach $(pidof -x name-of-program) |
Remember, we listen to you! Any comments/suggestions should be sent to info@serverbuddies.com. |
|
|
|
|