Click to See Complete Forum and Search --> : Allocating RAM


staffann
April 11th, 1999, 04:47 AM
I am a beginner with programming win32 systems, and I have a question that may (or may not) be very easy:
How can I allocate memory that I can be sure is in RAM all of the time (that is, I do not just want virtual memory that can be swapped out, I need it to be in RAM all of the time). I need this as a buffer in a measurement system, where I will loose data if the buffer is not available in RAM all of the time.

If possible, I would like to know how it can be done also generally in win32 C or C++, not just in Visual C++.

Thank you

/Staffan

April 12th, 1999, 05:03 AM
On NT you can use the Win32 routine VirtualLock.