handling memory

Blitz3D Forums/Blitz3D Programming/handling memory

nadia(Posted 2004) [#1]
I’m working on a project where I have to load many large scale pictures which stay in memory for quick access by user. Every time an image gets looked, a time stamp is stored. If a new picture is loaded I’d like to do a check on how much memory is used already. If it is over a specific percentage I’ll check via the timestamps which pictures wasn’t accessed for longest and free it from mem.
My questions:

To get the amount of vidmem is easy enough but how can I check with Blitz3D the amount of physical ram available and how much is in use without using virtual memory…

Thanks for any help!


Sunteam Software(Posted 2004) [#2]
I don't think you can do this with native b3d commands. You'll need to find a dll with the relevant functions, maybe someone else here knows of one, or has a wrapper for a windows one.


Strider Centaur(Posted 2004) [#3]
Interesting, considering blitz has to know this, internally, to be able to perform allocs when a new block is made. You would think there would simply be a freemem comand or something.

There are a number of, just do it and assume everything went according to plan, things in blitz. Sort of halfed baked, but its still one of the most baked 3D solutions around, without resorting to coding your own 3D functionality. :)


nadia(Posted 2004) [#4]
Does anybody know which window function would return the total and available or used amount of physical ram.
Or could you point me to any other dll which returns the above?

Thanks!