Windows 2000 Ramdisk Driver

Today's computers usually have a lot of memory that's remaining unused most of the time. So why not use it for a ramdisk holding constantly changing data like your browser cache, or maybe even the temp folder?

Microsoft never officially released a ramdisk driver for Windows 2000, though. There's only a sample driver for the Windows 2000 Driver Development Kit*, but that one's quite limited because it merely supports ramdisks up to 32 MB. I modified that driver to support drives up to 256 MB** (and if you need even larger drives, up to 4 GB, just change a constant and recompile).

The sector size is calculated and changed according to the ramdisk's size set in the registry (in the original driver, the sector size was fixed at 512 Bytes, leading to the 32 MB size limit of the ramdisk).

ramdisk.zip (24.6 KB)

The archive contains the source code and an already compiled, ready-to-install binary driver. Just extract the archive to a temporary directory, then:

  1. Double-click the Add/Remove Hardware Wizard applet in your Control Panel.
  2. Select Add/Troubleshoot a Device.
  3. Select "Add a new device".
  4. Select "No, I Want to Select the Hardware from a list".
  5. Select "Other devices" and then click Next.
  6. Click the "Have Disk" button and point to the ramdisk.inf file in the temporary directory.

The system will copy the ramdisk.sys file to the %systemroot%\system32\drivers directory and load the driver.

You should now have a new drive R: with a default size of 48 MB. You may change that size by modifying the DiskSize key under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Ramdisk\Parameters. You have to reboot for changes to take effect.


* Unfortunately, Microsoft discontinued the free download distribution of the DDK. It's now part of the Windows XP DDK that you can order here, or download if you have a MSDN subscription. The DDK is not required to be able to use the driver.

** I've received reports from users that ramdisk sizes larger than 128 MB won't work.


back