Dynamic Memory Management

The Dynamic Memory Management (DMM) feature provides an advanced method to utilize physical memory while emulating a hard disk. If this feature is enabled, only a minimum amount of memory, instead of full-scale memory amount requested, is allocated at the time of initial creation. Later it will automatically request memory allocations when current allocated memory amount is not enough for the new added data. In Windows 7 or newer Windows OS, if a virtual disk is formatted with NTFS file system, this feature is also able to release the corresponding memory when a file is deleted.

This feature is useful when you don’t want a ram disk to always occupy the system memory. For example, at some time you may use a ram disk for files downloading from Internet, and later you may need large amounts of memory to run a game. This feature makes you switch between these two scenarios conveniently.

The following figures demonstrate how Dynamic Memory Management works.

First let's check the available memory amount via Windows Task Manager before creating a ram disk. In this example, current available physical memory amount is about 4 GB.

To make a comparison, at first we create a ram disk of 3000 MB size WITHOUT Dynamic Memory Management feature. The available memory amount immediately reduces to about 1 GB which means that 3 GB memory is allocated out for this ram disk.

Now we remove this ram disk and create a new ram disk of the same disk size WITH Dynamic Memory Management. Check the available physical memory amount again, and you'll find that it is still about 4 GB which means that almost no memory is allocated out.

Next, we copy a file of 2 GB size to the ram disk. Primo Ramdisk will request memory to hold the arrived file. So you'll see the available memory amount reduces to about 2 GB.

In Windows 7, Windows Server 2008 R2 or newer Windows OS, if a ram disk is formatted with NTFS file system, Primo Ramdisk is able to release the memory to system after the files are deleted. Now we delete this 2 GB file and wait about 30 seconds, we'll find that the available memory amount return to 4 GB.

Compact Mode

Compact Mode provides better memory management algorithm by re-organizing data layout to make each memory block fully utilized before requesting a new one. For instance, without Compact Mode, it will cause almost all claimed memory to be allocated immediately in Windows Vista or Windows 7, if you do following operations: right-click the ramdisk drive in "My Computer" and then select "Properties" in the popped-up menu. However with Compact Mode, this issue will not happen.

The shortage of Compact Mode is that it costs minor performance of data access. Besides, it only supports Compact Image if the Image File feature is enabled.

Release Memory

You can manually release all occupied memory to system for a ram disk with DMM feature. Click on the icon button in the command toolbar to re-initialize a ram disk and release allocated memory.

Please note that this operation will delete ALL data on the ram disk and format the ram disk, also affecting its associated image file if have.