My game needs about 10 megs of memory, but usually Visual C has already allocated all my memory (96 megs). So when I start the game, it runs slow at first (because game data is in cache) and after a while it usually starts to run smoother (windows puts visual c data in cache and my game data in memory).
How to make this cache->memory happen faster?
Or how to tell windows to put everything else but my game in cache so I would have all the memory?
-Hans
Damn cache!
Try SetProcessWorkingSetSize. I have no idea if that is what it does but it looks similar...
What cache are you refering to? Cache is a good thing, and is better than memory. Are you talking about disk caching? That''s called paging. Just clarifying the terminology, because I don''t fully understand your question.
Rock
Rock
You could allocate all the memory you need at runtime, touch all that memory (read/write access) then use that memory with selfwritten dynamically allocation-routines. Carmack did it the same way in Quake and I think Tim Sweeney used a similar technique with Unreal. However, managing memory isn''t such an easy task. (maybe some-one could write a tutorial on that?)
hth
hth
gimme de cassshhhhhh.......
Carl "trixter"[email=carl@trixoft.com]carl@trixoft.com[/email]http://www.trixoft.com
You could try raising your app''s priority. That should at least disuade Windows from paging it out. But if another program needs memory, somebody is going to get paged out no matter what. I don''t know what algorithm Win uses to decide who to page out (non MS apps 1st , but increasing the priority should certainly help.
Rock
Rock
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement