Re: Forcing data into RAM memory only?
- From: "Slava M. Usov" <stripit.slough@xxxxxxx>
- Date: Sat, 22 Apr 2006 14:27:03 +0200
"hexa" <hexa@xxxxxxxx> wrote in message
news:1145686132.119320.207770@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hello,
I'm currently developing an open source tool for better privacy online
and offline; it would be very important, however, to prevent disk
swapping for this application, so that no sensible data gets written
to disk unless the program wants to write it.
I was wondering if it is possible to use APIs (or something else) to
force Windows to stop any disk swapping activity for this particular
application (using only available RAM memory, no virtual memory.)
Any suggestions on how i could accomplish this task?
Is it possible to do this using VirtualAlloc's MEM_PHYSICAL?
You cannot make an entire application non-pageable. However, you can
allocate regions of non-paged memory in an application. Consult PSDK/MSDN
for "Address Windowing Extensions". Basically, you need to call
AllocateUserPhysicalPages() to allocate a number of pages; then call
VirtualAlloc() with the flag MEM_PHYSICAL to reserve a window in your
address space; then call MapUserPhysicalPages() or
MapUserPhysicalPagesScatter() to map the physical pages into the window.
S
.
- Follow-Ups:
- Re: Forcing data into RAM memory only?
- From: anton bassov
- Re: Forcing data into RAM memory only?
- References:
- Forcing data into RAM memory only?
- From: hexa
- Forcing data into RAM memory only?
- Prev by Date: Re: Network file write speed
- Next by Date: Re: Re:What's the longest time before Windows flushes data to disk?
- Previous by thread: Re: Forcing data into RAM memory only?
- Next by thread: Re: Forcing data into RAM memory only?
- Index(es):
Relevant Pages
|