Hi,
I'm still having issues with that...
I use a composite viewer with only one view.
I tried to call startThreading/stopThreading() but it does nothing...
I also tried getAllThreads(...) to get for each thread its thread ID,
and it returns me only one thread with ID to 0... even if I know that
there is 2 threads running for the rendering...
I know I'm not supposed to disturb the rendering threads, but if I
cannot get them there is no risk at all...
Did I miss something ?
Thanks.
Regards,
Vincent.
Le 13/01/2011 11:49, Vincent Bourdier a écrit :
Hi Robert,
First of all thanks for your answer, I didn't know about the
Viewer::startThreading/stopThreading() and this sounds interesting
I know that my request seems to be a very strange way to manage memory
by pausing threads ... But I am not (completely) crazy. The datas
amount I have to manage is the reason why I need to be sure, before
loading a file, that I have enought memory including a fixed amount
that I reserve for the rest of the code... so I need to saturate
memory for a little while to be sure of the amount I can use, and for
that I need to stop other threads to be sure they won't crash because
of bad_alloc errors that are not managed.
Thanks, I'll have a look at the things you gave to me.
Regards,
Vincent.
Le 13/01/2011 11:32, Robert Osfield a écrit :
Hi Vincent,
The OSG threads that will run automatically are the DatabasePager when
you have paged databases and any viewer threads. There is a viewer
method for getting the threads.
However, the threads are designed to be arbitrarily paused, you can
start and stop the viewer threads via
Viewer::startThreading/stopThreading() but this creates and destroys
threads so not quite what you are after.
However, I'm kinda perplexed how you think you might be "managing
memory" more efficiently by pausing threads and "doing stuff" and then
un pausing. I can't help but feel that you need to take a step back
and work out what you mean by managing memory efficiently, there are
lots of different ways of doing this, but given no information about
what you mean and you actual motivation for this others like myself
can't really point you in the right direction, the best I can say is
from the sound of it you are currently looking in the wrong place.
Robert.
On Thu, Jan 13, 2011 at 8:14 AM, Vincent Bourdier
<vincent.bourd...@gmail.com> wrote:
Hi all,
Currently working on a way to manage the memory efficiently, I would
like to
know what are the osg threads running ?
I mean there are some threads in the databasePager, depending on the
rendering threading mode there are threads for the render, the cull, or
whatever...
Did I miss something important ?
What are the osg threads ?
I would like to be able to make some king of "pause" on all treads
to be
able to allocate the whole available memory for the process without
having
some crash because a thread would be working (and so allocating memory)
during this operation.
Thanks for your help.
Regards,
Vincent.
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org