Working with the Page File????

Is there a way that I can access the page file, or the page file usage of my Windows XP system
For some reason my app uses alot of RAM, and I was wondering, if it's possible to access the page file, so that I can basically capture a snapshot of the page file, or bookmark it at a point, and after I ran a specific function, which I know that uses a lot of RAM, and then just basically do a rollback ones the function has finished executed.

If someone can help me with this, please.

Thanks


Answer this question

Working with the Page File????

  • Branco Medeiros

    Hi sjb

    I think what you're really asking for is a way to roll back the managed heap (the page file is shared across all processes, and even if it were possible to edit the pagefile, it would likely crash the OS).

    Because of the way the garbage collector works, there is no way to do roll back the heap to a previous state. As I recommended to you in previous posts, the best way to reduce memory usage is to determine what objects are being kept alive, and release their references at the earliest point you no longer need them.

    Rico has outlined step-by-step instructions on how to do this: http://blogs.msdn.com/ricom/archive/2004/12/10/279612.aspx

    Hope that helps

    -Chris


  • stakei

    Hi Chris,

    Thanks for the reply, well I think I might have solved my problem.

    The Arrays I used in that spesific form was way-off to big.

    The arrays I used was like array(100000) and proberly 12 of them, which had to load each time the form was populated, and I reduced it to array(20), and it seems to be allright now.

    I really hope that was the problem.

    Thanks


  • Working with the Page File????