ImagesOperatorsMemoryFreePhysical Method (McImages)
|
|
The amount of free physical memory in MB.
Namespace:
MediaCy.IQL.Operators
Assembly:
MediaCy.IQL.Operators (in MediaCy.IQL.Operators.dll) Version: 3.1.0.0
Syntax
RemarksThis is a read/write property. When read, the amount of physical
memory currently available, in MB, is exposed. This is the amount of
physical memory that can be immediately reused without having to write its
contents to disk first.
On assignment, if necessary sections of unlocked image memory are swapped
out to disk to free up the requested amount of physical memory. Frame
memory is swapped to disk in ascending order of the
McFrame.NextAccessPriority value (lower values go first); however, the
memory of frames with a McFrame.NextAccessPriority of 1000 or greater are
unlikely to be swapped out, even if it is unlocked. Note that the requested
MemoryFreePhysical value may not be achievable by swapping out image frames,
but this is not treated as an error. To check for the success of the
request, access the MemoryFreePhysical property again and verify that it is
at least as large as your request.
The virtual memory system will also swap physical memory to a page file to
meet physical memory allocation requests. This swapping by the operating
system is done on a last-used basis, so assignment to MemoryFreePhysical
will be beneficial only when you know that you have image memory that is unlikely to
be needed again for a time (e.g., images saved as part of McImage.UndoStack
operations).
Thus if an algorithm requiring a large amount of non-image memory is to be
run, you can use McImage.SetNextAccessPriority to set the NextAccessPriority
of frames you will use in the algorithm to 1000 and then assign your
desired free physical memory (in MB) to McImages.MemoryFreePhysical. Note
that you do not need to do this if your algorithm only requires image memory,
since the swapping of low priority frames is done automatically for all
image memory allocation requests.
See AlsoReference
MemoryFreeLogical
MemoryInformation