Registered Member
|
Hi,
I've been profiling my code using valgrind.... (using marble built from latest source, ubuntu 12.04) It appears that just instantiating a GeoDataCoordinates causes a chunk of memory leakage. Here's my test program:
Running under valgrind generates lots of errors similar to this:
And the final summary is:
I looked at a few of the errors and it seems to be due to dynamic allocations done while creating static objects. Also note that if I create 2 GeoDataCoordinates the leak count stays the same. So it seems like a one time hit in this case. This is the most trivial case. I've got some slightly more complex code that shows even more errors from valgrind. So, I guess my question is, how stable is marble during runtime? Can I expect (otherwise non-leaky) apps written using it to run for extended periods of time without exhausting system memory? I'm sure some of these issues are known. Is there work going on to address the leakyness? Is there somewhere I could jump in and help with this? Thanks! |
KDE Developer
|
Absolutely. We're running Marble (stable and unstable versions) at work embedded in a variety of applications and didn't have any leak problems (read: memory usage increasing over time) so far.
Given that it works well in practice it doesn't have a too high priority in our TODO list. However, patches to improve/fix it would still be appreciated, be it just to have less noise in valgrind. A good starting point should be the tests in tests/. You can run all via 'make test' or individual ones directly from the build directory (they're not installed). Requires the Qt only version IIRC (cmake -DQTONLY=TRUE). For fixing the issues have a look at the classes in src/lib/geodata/data, especially their private classes. They're not trivial though due to http://techbase.kde.org/Policies/Librar ... D-Pointers |
Registered users: Bing [Bot], claydoh, Google [Bot], rblackwell