Use Page File

  • Thread starter Thread starter cfps.Christian
  • Start date Start date
C

cfps.Christian

Is there a way to tell a process to specifically use the page file for
object storage?

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.
 
Is there a way to tell a process to specifically use the page file for
object storage?

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.

Hi,

I suggest you to find another apporach, what about loading partially
the objecT?
What kind of objets are you talking about?
 
I suggest you to find another apporach, what about loading partially
the objecT?
What kind of objets are you talking about?

Images

The application loads a TON of images and it requires thumbnails the
majority of the time. These are dynamically generated images so we
don't have an image on the drive to pull from. I'd been told years
ago that you can write specifically to the PageFile but that may only
be in C++ or a lower level language.

I was hoping that my lack of need for speed would mean that I could
put them all in the pagefile or put a flag somehow to tell the OS that
the memory should go to page or whatever.

Unfortunately another moment where imagination is limited by language
constraints.
 
cfps.Christian said:
Is there a way to tell a process to specifically use the page file for
object storage?

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.

All .NET objects gets allocated in virtual memory. Some of them will
reside in physical RAM - some of them (hopefully not too many !) will
reside in the page file.

AFAIK there are no way that you can specify that some objects
should reside in page file and not in RAM.

(there are way to specify that objects should reside in RAM
and not in page file even though I don't think you can do that
for managed memory)

If you need to have it in a file, then write and read the objects
explicit to and from a file in a binary direct access way that is
reasonable efficient.

But I don't think it is worth coding that. The paging mechanism is
pretty sophisticated, so if you do not access your 300 MB of
objects *and* the system need the RAM, then they will end up in
the page file. If you need access to the objects then you don't
want them on disk. And if there are available RAM, then you can just
as well use it.

Arne
 
Peter said:
I assume here you are using "page file" to be synonymous with "swap file".

Rather unlikely.

Page file is the term used on Windows (NT family - not 9x family).

Swap file is the term used on *nix.

Arne
 
Back
Top