[osg-users] osg-users Digest, Vol 34, Issue 32
lilinx at 21cn.com
lilinx at 21cn.com
Mon Jul 23 10:43:56 PDT 2007
HI,Robert Osfield£¡
I use "osgviewer.exe cow.osg", and the memory increases stably about 70-80k per second. (cow.osg is 639k)
use "osgviewer.exe dumptruck.osg", and the memory increases stably also about 70-80k per second. (dumptruck.osg is 1,816k)
cow.osg and dumptruck.osg is standard OSG example data.
use "osgviewer.exe mymodel.ive", about 176-180k per second, mymodel.ive is very simple model(no Particle/animation/shader etc.), and about 16,772k
======= 2007-07-24 00:35:59 ÄúÔÚÀ´ÐÅÖÐдµÀ£º=======
>Hi Lilinux,
>
>I don't have explanation for the memory usage growth you've observed.
>I will run some tests at me end to see if there is anything similiar
>happening under Linux.
>
>How long does it take to get to 200M? What type of app and model are
>you testing against? If you have a particular standard OSG example
>and data that reproduces this then I can look at the same usage on my
>machine.
>
>Robert.
>
>On 7/23/07, lilinx at 21cn.com <lilinx at 21cn.com> wrote:
>> hi Robert,
>>
>> I look this memory in windows "TaskMgr", is not in VS IDE.
>> In addition, when I minimize the console window, the memory
>> decrease to normal level soon(eg. 20M to 5M), then increase
>> slowly per frame again(eg. 5M--5.1M--5.2M...200M). It seen
>> that until I minimize the console window, the cached objects are
>> really deleted.
>>
>> ======= 2007-07-21 17:29:40 ÄúÔÚÀ´ÐÅÖÐдµÀ£º=======
>>
>> >HI Lilinx,
>> >
>> >The difference in DrawThreadPerContext and
>> >CullThreadPerCameraDrawThreadPerContext is that they use an
>> >osg::DeleteHandler to cache the last two frames worth of deleted
>> >objects to avoid issues with objects being deleted which others
>> >objects have handles to them. This caching is flushed on each frame
>> >to get rid of objects older than 2 frames.
>> >
>> >In 2.0 during clean up more objects than usually get placed in the
>> >DeleteHandler and aren't flushed explicitly, but flushed when the
>> >DeleteHandler goes out of scope. A problem here can arise in the if
>> >say osgUtil objects are in the DeleteHandler waiting to be deleted and
>> >the osgUtil library gets unloaded then a call to delete these objects
>> >will be undefined. This may be where the memory leak is reported, or
>> >perhaps its simply the the memory detector is make its decision about
>> >what is a memory leak too early in clean up - this has been a known
>> >issue under VS for a long while.
>> >
>> >Since 2.0 I have clean up the way that the DeleteHandler is used on
>> >exit, so that when osgViewer unloaded its automatically flushes the
>> >DeleteHandler and switches off its caching so that all objects delete
>> >right away. I don't know if this will affect the memory leak
>> >reporting though, as VS' memory leak detection is a bit flaky.
>> >
>> >Robert.
>> >
>> >
>> >
>> >
>> >
>> >On 7/21/07, lilinx at 21cn.com <lilinx at 21cn.com> wrote:
>> >> osg-users-requesthi,all
>> >>
>> >> memory leak problem
>> >>
>> >> I work on windows xp, 2cpu(Pentium (R) D CPU 2.8GHz), Nvida 7300GT grahpic card, osg2.0 compile with vc71.
>> >> I test :
>> >> 1. osgviewer.exe cow.osg --SingleThreaded , no memory leak
>> >> 2. osgviewer.exe cow.osg --CullDrawThreadPerContext , no memory leak
>> >> 3. osgviewer.exe cow.osg --DrawThreadPerContext , has memory leak
>> >> 4. osgviewer.exe cow.osg --CullThreadPerCameraDrawThreadPerContext , has memory leak
>> >> 5. osgviewer.exe cow.osg , has memory leak (auto select DrawThreadPerContext)
>> >>
>> >> I test on other single cpu computer, the differences is "osgviewer.exe cow.osg" no memory leak(auto select SingleThreaded).
>> >>
>> >> lilinx
>> >> lilinx at 21cn.com
>> >>
>> >> _______________________________________________
>> >> osg-users mailing list
>> >> osg-users at lists.openscenegraph.org
>> >> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>> >>
>> >>
>> >_______________________________________________
>> >osg-users mailing list
>> >osg-users at lists.openscenegraph.org
>> >http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>> > (B
>> >__________ NOD32 2411 (20070721) Information __________
>> >
>> >This message was checked by NOD32 antivirus system.
>> >http://www.nod32cn.com
>> >
>> >
>>
>> = = = = = = = = = = = = = = = = = = = =
>>
>>
>> ÖÂ
>> Àñ£¡
>>
>>
>> lilinx
>> ¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡lilinx at 21cn.com
>> 2007-07-23
>>
>>
>> _______________________________________________
>> osg-users mailing list
>> osg-users at lists.openscenegraph.org
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
>>
>_______________________________________________
>osg-users mailing list
>osg-users at lists.openscenegraph.org
>http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
>
>__________ NOD32 2414 (20070723) Information __________
>
>This message was checked by NOD32 antivirus system.
>http://www.nod32cn.com
>
= = = = = = = = = = = = = = = = = = = =
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡ÖÂ
Àñ£¡
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡lilinx
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡lilinx at 21cn.com
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡2007-07-24
More information about the osg-users
mailing list