Low Spec, checking users RAM or Virtual Memory. How?

My application requires 500-700 Mb RAM so I want to be able to have a low spec of 512 Mb RAM but since computers these days have lots of virtual memory, how will I be able to tell if as user is running with a low spec?

I had a neat way of determining memory shortage when loading the images and when it failed loading an image then i set a boolean to TRUE and knew inside the software that the user had too low memory.

But, since virtual memory means someone can sit with 128Mb RAM and 1Gb virtual memory, what should I do to prevent crawling app on sub standard users?

Set your max heap ( -Xmx) to anumber well below your stated miminum memory requirements.

If someone tries to run your game below the min requirements its their funeral.

My game can be run in 2 ways
i) 300 Mb (excluding some zoom levels meaning alot less maps and arts)
or
ii 700 Mb (all arts in game being preloaded in memory to be used in the game)

So, for high spec CPU i want to be able to run the second option and for low spec the first option.

Problem is, even with low spec 512 Mb if running the game and it picks option 2 then it will be crawling using virtual memory when RAM runs out.

You shouldn’t try to keep all resources in memory all the time. You should only load resources you need for a level.

I need everything available at all time because changing zoom level is done in just a second and in the future when ppl have 1-2 Gb RAM, who would care if a game uses 600 Mb ?

Are you using Java2D for rendering? If so, there’s no need to pre-scale images for zooming if you use the ogl pipeline since it does it seemlessly on-the-fly, for images or Shapes. No frame rate penalty at all 8).

Keith

The thing that eats hundreds of Mb for me is a large map for the max zoom in view 9000x4640 pixel png file.

the whole lazy loading bit puts ppl down and should not be used indiscrimiatedly. And yes memory is there to be used, if your target customer/gamer is playing the newest games you can easly set the bar for memory high. that beeing said unconstrained use and refeting it back can be time consuming as well.

anyways this might be usefull I haven’t fiddled with it no time and no need yet,
try scrolling down to Monitoring and Manageability:
http://java.sun.com/developer/technicalArticles/releases/j2se15/