Hi Vaibhav,

Vaibhav Saxena wrote:
> Hi All,
>
> Has anybody done any memory leak analysis of OpenSG  on Windows ?
>   
I periodically check for memory leaks (not on Windows, but that 
shouldn't make a difference). I use valgrind, which is pretty picky 
about these things.
> I tried to figure out if there are any memory leaks in OpenSG on
> Windows and got few memory leaks. Here is what I did :
>
> I took OpenSG tutorial example 01hello.cpp and made two cut short
> versions of it :
> Program 1 :  containing just osgInit and osgExit
> Program 2 :  01hello.cpp without glut motion and mouse callbacks etc
>
> [Code for these two programs is pasted below together with their
> memory dump statistics]
>
> Running these two programs in debug mode (with OpenSG debug libraries)
> shows following memory leak statistics :
>
> Program 1 (OpenSG 1.6) : 176 bytes leaked
> Program 1 (OpenSG current CVS build) : 4 bytes leaked
>
> Program 2 (OpenSG 1.6) : 343000 bytes  leaked
> Program 2 (OpenSG current CVS build) : 350116 bytes  leaked
>
> Is this kind of memory leak expected or already known to exist ? Is
> there anyway to avoid/fix these memory leaks ? My only worry is that
> if we increase the complexity of the application the memory leak might
> go even higher.
>   
So far I haven't found any real memory leaks. I define those as things 
that keep growing as the app runs, e.g. you keep displaying and changing 
things and memory keeps on growing. I haven't seen any of those in a while.

For your second test: osgExit does not guarantee that all memory is 
freed. There can still be some static internal structures that use a 
fixed amount of memory, and right now I'm unsure whether it frees all 
FieldContainers. Can anybody take a quick look at the code to confirm that?

Yours

    Dirk



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to