Skip to main content
gamedev.net
🔒 Locked

Memory question

Started by Zeblar Nagrim Oct 5, 2002 at 6:57 PM 3 replies 200+ views
niyaw
niyaw
VirtualQuery, also PSAPI routines. I have some source code if you want it.
Zeblar Nagrim
Zeblar Nagrim
Thanks Niyaw!

But what is this?

#include <atlbase.h>
#include <atlapp.h>
extern CAppModule _Module;
#include <atlmisc.h>
#include <psapi.h>

I don´t have those header on my computer...

Anyway...

Why not simple just call GlobalMemoryStatus when the program
start, register the dwAvailPhys member and call the function a second time when all memory have been allocated and subract the members from each other and divide by 1024?
niyaw
niyaw
quote:
Original post by Zeblar Nagrim
Thanks Niyaw!

But what is this?

#include <atlbase.h>
#include <atlapp.h>
extern CAppModule _Module;
#include <atlmisc.h>
#include <psapi.h>

I don´t have those header on my computer...


that is needed for WTL''s (Windows Template Library) CString class, which the driver program uses. you can download WTL from msdn.
quote:

Why not simple just call GlobalMemoryStatus when the program
start, register the dwAvailPhys member and call the function a second time when all memory have been allocated and subract the members from each other and divide by 1024?

because other programs influence the value returned by globalmemorystatus? also, the virutalquery/psapi provide much more information.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.