Peer-to-Peer Forum

 

Login Register    
LADBM Memory Management Problem
Posted: 24 May 2010 09:44 AM  
Newbie
Rank
Total Posts:  9
Joined  2009-04-02

Hi
We have a city tramway simulator project that includes whole city buildings as 4 ladbm model and only one of them is active on the scene at the same time.However even 3 of them is not active(not attached to scene) on scene vega still load their textures and because of that our memory usage increases up to 2.5 gb (and because we are using 32 bit application so it reaches the user memory limit and vega crashes).
What I want to do is simple,I only want vega to load textures for only the ladbm model which is active on the scene and not load(delete) the others.
But I couldnt do it anyway.I’ve tried to multiply ladbmpagingstrategy and also tried to remove datasets from pagingstrategy but none of them is worked.
Do you know anyway for ladbm to decrease memory usage after I deleted them from scene
Thanks

 
Posted: 27 May 2010 04:22 AM   [ # 1 ]  
Newbie
Rank
Total Posts:  1
Joined  2009-11-27

We have been having a similar problem with the LADBM in that we only wanted the textures loaded for the paged in area occupied and as we to are running on a 32bit system this was quite important. The solution to this was to call the following code  
  vpPagingMgr::instance()->getPalette()->lock();
  vpPagingMgr::instance()->getPalette()->clean();
  vpPagingMgr::instance()->getPalette()->unlock();

On the event call back EVENT_TILE_POST_LOAD

This frees the memory as you move around the LADBM and means you only have the textures loaded for the area that you are residing in at the time.

Unfortunately I am unable to help you with the unloading of the datasets as this is currently something that I am working todo myself and have not had much luck so far.

 
Posted: 26 July 2010 11:44 AM   [ # 2 ]  
Jr. Member
RankRank
Total Posts:  33
Joined  2009-04-03

Hello,

Did either of you make any more progress on this issue?

Do you know if this method of cleaning the pallet will unload unused virtual textures?

I am in search of ways to keep memory usage down, so any other comments on this would be much appreciated.