Re: Forcing data into RAM memory only?

Tech-Archive recommends: Fix windows errors by optimizing your registry



"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


.



Relevant Pages

  • Re: OOM killer gripe (was Re: What still uses the block layer?)
    ... not thrashing is that all of the pages in RAM are in the swap cache, ... used to be able to do 3 point something megabytes per second to/from disk, ... But swapping heavily has been a viable mode of operation ... speeds aren't keeping up with processor and memory increases. ...
    (Linux-Kernel)
  • Re: Error checking does not work
    ... I went over all the information that you gave me and I seem to be able to operate the Cmd. ... window OK. ... When Chkdsk is working properly and I restart the PC I get a window that tells me that I can hit "any key" to stop the process. ... It is allmost like some unknown gremlin has ordered check disk to be aborted. ...
    (microsoft.public.windowsxp.newusers)
  • Re: window xp not starting from recovery cd
    ... Does it matter to what kind of computer I hook up this hard drive as a slave? ... Do I need a the file recovery software? ... window will start normaly in 30 sec or you can start safe mode, command, ... your hard disk and connect it as a slave disk to his own machine so that you ...
    (microsoft.public.windowsxp.general)
  • Re: Repair Office XP goof
    ... at microsoft can jump start ... a check disk might help too. ... install window pop up when trying to use Excel, but not for Word, ... I thought I would uninstall FrontPage since the install ...
    (microsoft.public.office.misc)
  • Re: Repair Office XP goof
    ... at microsoft can jump start ... a check disk might help too. ... install window pop up when trying to use Excel, but not for Word, ... I thought I would uninstall FrontPage since the install ...
    (microsoft.public.office.misc)