Hmmmm... Where to start?

1. Windows will hog quite a bit of memory to begin with, so you don't
really have 3G available.
My 3G machine shows 2.5G available after windows loads.
2. Even if you did, the per process limit for 32 bit is 2G.
3. I think windows even restricts that a bit further.
4. MFC is a bloated beast that will take some of that 2G.

Anyway, you would be better off posting some code that did the
following.

1. allocate a huge amount of space (500MB)
2. Attach it as vertex data to some OSG nodes.
3. Point out where it blows up. (if that's all it takes).

You could modify osgviewer to do this.

Otherwise, there are lots of different things that could be wrong.

Chris




 

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Stephen
Northcott
Sent: Wednesday, January 30, 2008 4:35 AM
To: OpenSceneGraph Users
Subject: [osg-users] Heap and Out Of Memory error on XP

I am getting Out Of Memory errors from OSG.

I know why, kind of, but am surprised this is not handled more
elegantly. Can anyone shed some light for me..

I have a very large data-set which requires being in memory at all
times. Unprocessed it is around 750MB++.
It is typically 500MB after I have loaded it and formatted it for
efficiency of storage.

I load it in chunks (rather than load it as a 750MB++ raw data file) and
then process it to the 'working' 500MB chunk.
But at the end of all this I still need to have the resultant 500MB
structure sitting in memory.

On a PC with 3GB of RAM I am able to do this, however, when I then try
to initialize a scene graph based on about 1 or 2% of this data I get an
Out Of Memory error from OSG.

This is running in MFC on XP.

I could, I suppose, write a wrapper class to access this 500MB chunk of
data, and put it into smaller 50MB chunks, for example.
But I don't see why I should have to when I have a 3GB machine for this
task!
I am also drawing this in real time from the database so any extra
misdirection really does slow things down, and I am already doing lots
of indexing and so on to speed access. A wrapper would simply undo all
of that hard work on optimization.

I am attempting to make some kind of wrapper as a fallback, but am still
a bit confused as to why OSG is throwing an out of memory problem when
there is quite a lot of free RAM sitting around on a quite often
recently re-booted PC!

Is there any way to get more info on the Out Of Memory error, and any
way to work around it.. Windows gurus?

Thanks.
Stephen.
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or
g
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to