Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Physical memory only

Status
Not open for further replies.

BothKill

Technical User
Nov 20, 2001
1
RO
Hi all,

Is there any way to force the memmory allocation within a program to use only the physical memory? or,

Is there any way to find out, while running the program, if the respective program uses virtual memory?

I am referring specifically to a Win32 Console Application which runs under WinXP.

Although I have exactly determined the necessary memory for my program and it seemed that it fits in my available physical memory it looks like my program uses too much the HDD.

Thanks!
 
I think that Windows will be the one deciding what does fit and what does not fit in your physical memory, depending on the needs of other processes.
Greetings,
Rick
 
No, you can force Win32 to lock memory into physical memory using the VirtualLock() function. Please look at the documentation of VirtualLock() for details because there are some prerequisites (all memory pages must be committed, there is a maxiumum of locked pages, etc.).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top