no, 2G is avaible I mean On Wed, Apr 15, 2009 at 5:43 PM, Lingyun Yu <lingyun.yu...@gmail.com> wrote:
> Thank you very much, Ismail and Martin, > > I have 3G memory installed. and 1.02G is avaible, I use windows vista. and > I didn't use file page file/swap. > > I will read carefully about both of you suggested. If you have some source > can be read for that, please tell me. > > Yun > > > > On Wed, Apr 15, 2009 at 5:10 PM, Martin Beckett <m...@mgbeckett.com> wrote: > >> vector typically doubles the size of memory it reserves when it needs more >> space. This is because every time it allocates new memory it must move the >> contents of the existing memory - it's slow to copy all the existing >> elements and so it makes sense to only increase as few times as possible >> (see http://www.ddj.com/cpp/184401375 for a discussion). >> Unfortunately this isn't a good stratergy when you are almost out of >> memory. >> >> Another problem is that the memory must be contiguous (ie in one block), >> so if you frequently allocate and delete memory there might not be a single >> free block large enough - even if you have enough overall memory. >> >> There is also a little 'trick' to reduce a vector back down to the minimum >> required memory - see http://www.gotw.ca/gotw/054.htm >> >> Code: >> vector<stuff>( c ).swap( c ); >> >> >> >> (note - can someone confirm the swap() trick works with ref counting?) >> >> ------------------ >> Read this topic online here: >> http://forum.openscenegraph.org/viewtopic.php?p=10259#10259 >> >> >> >> >> >> _______________________________________________ >> osg-users mailing list >> osg-users@lists.openscenegraph.org >> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org >> > > > > -- > Cheers, > Yun > -- Cheers, Yun
_______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org