CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2005
    Posts
    1,828

    Setting Page file

    Is there any ways I can change the virtual memory paging using MFC?

    Thanks in Advance

  2. #2
    Join Date
    Dec 2004
    Location
    Ann Arbor, MI
    Posts
    281

    Re: Setting Page file

    Do you mean virtual memory for your process's virtual address space, or are you trying to change the system-wide virtual memory settings?
    --EJMW

  3. #3
    Join Date
    Apr 2005
    Posts
    1,828

    Re: Setting Page file

    Quote Originally Posted by ejmw View Post
    Do you mean virtual memory for your process's virtual address space, or are you trying to change the system-wide virtual memory settings?
    System wide virtual memory

    I want to change the pagning size programmatically or remove paging. How can I accompalish this?
    Attached Images Attached Images  

  4. #4
    Join Date
    Aug 2008
    Location
    Scotland
    Posts
    379

    Re: Setting Page file

    Hi,

    There's no API to do this, but I see that some people have reported succesfully changing the pagefile settings by editing the registry values at
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\PagingFiles

    You'll see that this key includes the name of the paging file(s) on each drive, and the max/min sizes if specificed. The format is fairly self-explanatory.

    You have to reboot the PC after doing that. You shouldn't need to create any paging files yourself since they'll be created at boot time.

    I'd advise extreme caution if you try this. One thing to take care of will be to check that there is space on the drive you've chosen.

    Alan

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured