Comment 37 for bug 565981

Revision history for this message
Petar Velkovski (pvelkovski) wrote :

Conn O Griofa I believe you are misinterpreting the results (or the test is not reliable indication of the memory leak). This is how I know that the patch works. I have a System Monitor active in my top panel. Right click the System Monitor and select Memory in Monitored Resources (if not already selected).Below for the Colors option choose "Memory" and set 5 different colours for User, Shared, Buffers, Cached, Free. What interests you is the colour for "Cached" memory. Start using your computer. Open Firefox, Office, play a movie and you'll notice that the "Cached" memory increases. Once your Cached memory takes significant amount of RAM, try executing this commands:

sync
sudo sh -c "echo 3 > /proc/sys/vm/drop_caches"

This should clear the cached memory (not entirely, but I suppose this is a normal behaviour). For instance after executing this command on my system the System Monitors says that 27% of my computers memory is used by programs and 18% is used as cache (it was 31% used by programs, 63% used as cache before the execution). And my system uses the xorg package from https://launchpad.net/~ubuntu-x-swat/+archive/x-updates, which solves the memory leak problem for me. If there is a memory leak, the previous command will be able the release only small portion of the cached memory. So even if it manages to release half of the cached memory on the first try, this is still an indication that there is a memory leak.

Also keep in mind that the system is automatically droping the cache memory from time to time. So try this:
1.Open an application(s) using a lot of memory (OpenOffice Write, Firefox, Gimp etc.)
2. execute:
cat /sys/kernel/debug/dri/0/gem_objects | grep 'object bytes'
3. wait for a few seconds (5, 10, 15 sec)
4. repeat procedures 2 and 3 a few times
5. Close the application(s) using a lot of memory
6. Do procedure 2 and 3 (one or two times)

If during following the procedure above the "object bytes" number NEVER decreases then you do have a memory leak. If the number oscillates (for exsample goes up, down, up, up, down) then you are fine and there should be no memory leak.