Allocating Memory in MIPAV

From MIPAV
Revision as of 18:18, 10 April 2012 by Olgavovk (Talk)

Jump to: navigation, search

When you run MIPAV for the first time you must specify the amount of memory that you would like to allocate, so that MIPAV can take the full advantage of the memory resources available in your machine.


1 Select Help > Memory allocation in the MIPAV window. The Change JavaRuntime Memory Allocation dialog box opens. See Figure 3.
2 Change the maximum heap size number so that it reflects the maximum amount of memory that should be allocated.
In a Microsoft Windows system, you can specify a maximum to 1.2 or 1.3 Gb. If additional memory is needed, MIPAV allocates it until the memory reaches the maximum heap size that you specify.
3 Click OK to close the dialog box.

Figure 3. Change Java-Runtime Memory Allocation dialog box

ChangeMemoryAllocation.jpg


You must restart of MIPAV for the changes to take effect. To exit MIPAV, select File > Exit. Then, restart the software.

To allocate additional memory

The first step is to view how much memory is currently being used and to free needlessly reserved memory. Then, if necessary, you may need to allocate additional memory.

To determine how much memory is currently being used by MIPAV
1 Select Help > Memory Usage in the MIPAV window. The Memory Monitor dialog box appears (Figure 4).
When MIPAV performs a function, such as visualizing an image file, it uses memory. When the function completes (i.e., the visualized image closed), you can manually free the memory so it can be used for another function.
The Memory Monitor dialog box shows how much memory is allocated and how much memory has been used. The vertical bar on the right of the window displays a pictorial representation of the ratio of allocated memory or amount of memory used. The chart shows the memory usage for the past 3 minutes and 45 seconds. The chart is updated every second.
If you want to constantly monitor your memory resources, you can leave the Memory Monitor dialog box open on your desktop. Otherwise, close it.
2 Click Free memory to free memory.

Figure 4. Memory Monitor dialog box


MemoryMonitorDialogBox.jpg


If you need more memory, you can allocate virtual memory or disk swap space if there is free space on your hard drive. For instructions on how to do this, refer to the documentation for your system. If you cannot assign more virtual memory or disk swap space, you may need to install additional memory. To manually free the memory

As Java-based programs run, they often leave old variables, objects, or constructors in memory. For instance, if you delineate a VOI, the coordinates of the contours may remain in memory even after you close the image. Java provides a method called the garbage collector (or memory recycling) that automatically freeing objects that are no longer referenced by the program and clears all unnecessarily reserved memory. Generally, the software does this automatically when free memory becomes very limited. However, you can run the garbage collector at any time to free memory by clicking the Memory Usage button. Refer to Figure 5. To allocate additional memory,

Repeat the steps described in "Allocating memory in MIPAV".


Figure 5. Running the garbage collector to free the memory in MIPAV

MemoryUsageBut.jpg



MIPAV toolbars