System RAM within Blitz?

Blitz3D Forums/Blitz3D Beginners Area/System RAM within Blitz?

Kryten(Posted 2004) [#1]
Probably a silly question, but is there any way to find out how much system ram (NOT video) is being used by a program from within Blitz?

If not could anyone recommend a method for getting this info? (Win 98). Im interested in seeing just how much resouce Im taking up..

Thanks!


skn3(Posted 2004) [#2]
you could try pressing ctrl+alt+del and look in the processes list. It shows how much mem a speciffic program is using.


puki(Posted 2004) [#3]
Yeh, but I think he is talking about within his program - this is achievable but requires a DLL (if I remember correctly) - I've seen an example in the code archives before.


tonyg(Posted 2004) [#4]
The Extended B2D dll has commands for this.


Kryten(Posted 2004) [#5]
Cool, thanks guys - Ill check that out then.


D2006(Posted 2004) [#6]
if i am not to late:

kernel32.decls
.lib "kernel32.dll" 
GetMemoryInfo(bank*):"GlobalMemoryStatus" 

example
bank = CreateBank(32) 
GetMemoryInfo bank 
var = PeekInt(bank, x*4 )

the value of x depends on what information you want:
1...used memory (percent)
2...total physical memory (bytes)
3...free physical memory (bytes)
4...number of bytes in paged files
5...number of free bytes in paged files
6...total virtual memory
7...free virtual memory

hope it helps

regards
D2006


puki(Posted 2004) [#7]
Yep, the kernel32.dll was the one I was thinking of.


Kryten(Posted 2004) [#8]
thanks again, not too late!

appreciate the feedback, cheers!


Agamer(Posted 2004) [#9]

you could try pressing ctrl+alt+del and look in the processes list. It shows how much mem a speciffic program is using.



You can't do that in 98 as it was only added in 2000 I think!