On Mon, 28 Jul 2008 13:20:06 -0700, cfps.Christian <ge*******@otc.edu>
wrote:
Is there a way to tell a process to specifically use the page file for
object storage?
I assume here you are using "page file" to be synonymous with "swap file".
Our problem is we are loading objects that need to be stored during
application runtime but not actually saved until told to do so. In
our case these objects can easily eat 300+ MB of memory.
Unfortunately we can't save any of the images until the overall
project is saved so we don't have the luxury of the local drive for
temp storage.
Why not?
But as far as your specific question goes, if you store the data in
memory, it will be backed by the page file as needed. You don't need to
do anything special to have that happen.
Conversely, you cannot have something backed by the page file unless you
have made room for it in your virtual address space. Even if there were
some mechanism by which you could tell Windows "_really_ put this in the
page file", you would still be limited by the same constraints associated
with memory allocations generally.
If you have data that is too large to fit in your process's address space,
the file system is where you're going to have to put it. If you aren't
able to do that for some reason (and why not?), then I think you're stuck
needing a solution that allows you to deal with only a portion of the data
at a time (just as Ignacio suggests).
Pete