ramdrive.sys(CMD) 19 June 1992 ramdrive.sys(CMD) Name ramdrive.sys - create a RAM disk Syntax device=[drive:][path]ramdrive.sys [DiskSize SectorSize] [/e|/a] device=[drive:][path]ramdrive.sys [DiskSize SectorSize NumEntries] [/e|/a] Description Creates a RAM disk in your system's random-access memory (RAM) to simu- late a hard disk drive. RAM disks are much faster than hard disk disks because the information they contain is always loaded into memory. RAM disks are temporary-any data you place on a RAM disk is lost when you turn off your computer. You can set up as many RAM disks as you want, limited only by the amount of memory your computer has. To do this, add one RAMDRIVE.SYS line to your CONFIG.SYS file for each additional RAM disk. Parameters [drive:][path] Specifies the location of the RAMDRIVE.SYS file. DiskSize Specifies the size (in kilobytes) of the RAM disk. Valid values for DiskSize are in the range 16 through 4096. The default value is 64. SectorSize Specifies the disk sector size (in bytes). Valid values for SectorSize are 128, 256, and 512. The default value is 512. If you include a value for the SectorSize parameter, you must also include a value for the DiskSize parameter. Although you can change the SectorSize value, the default value is strongly recommended. NumEntries Specifies the number of files and directories you can cre- ate in the RAM disk's root directory. Valid values for NumEntries are in the range 2 through 1024. The default value is 64. If you include a value for the NumEntries parameter, you must also include values for the DiskSize and SectorSize parameters. Switches /e Creates the RAM disk in extended memory instead of in expanded or conventional memory. /a Creates the RAM disk in expanded memory instead of in extended or conventional memory. Notes Using the NumEntries parameter RAMDRIVE.SYS rounds the number you specify up to the nearest sector boundary. If there is not enough memory to create the RAM disk as speci- fied, RAMDRIVE.SYS attempts to create it with a limit of 16 directory entries. This can result in a RAM disk with a different limit from the one you specified. Using conventional memory Although specifying a memory type is optional, it is strongly recom- mended. If you omit both the /e and /a switches, RAMDRIVE.SYS uses your system's conventional memory. It is not a good idea to use conventional memory for a RAM disk, because this reduces available work space for pro- grams. However, if you do not have extended memory, expanded memory, or a hard disk drive, you might want to use conventional memory for a RAM disk. A RAM disk can increase the speed of a floppy disk system signifi- cantly enough that it may be worth the loss of some conventional memory. Using extended memory If your system has extended memory installed (starting at the 1-megabyte boundary), you can use this extended memory for one or more RAM disks. For RAMDRIVE.SYS to use extended memory, you must first install HIMEM.SYS or another extended-memory manager that conforms to the Lotus/Intel/Microsoft/AST eXtended Memory Specification (XMS). In your CONFIG.SYS file, the device command that installs the XMS extended-memory manager must precede the commands that install the RAM disk. Using expanded memory For RAMDRIVE.SYS to use expanded memory, you must configure your system so that it provides expanded memory. In your CONFIG.SYS file, the device command that installs the expanded-memory manager (such as EMM386.EXE) must precede the device command that installs RAMDRIVE.SYS. The expanded-memory manager must conform to the Lotus/Intel/Microsoft Expanded Memory Specification (LIM EMS). Increasing the efficiency of a RAM disk For the best results with a RAM disk, you can define a TEMP environment variable and set it to point to a subdirectory on the RAM disk. Examples To create a RAM disk in extended memory and allocate 64K (the default amount) of extended memory to RAMDRIVE.SYS, add the following line to your CONFIG.SYS file: device=ramdrive.sys /e Since no location is specified, MS-DOS searches for RAMDRIVE.SYS in the root directory of your startup drive. Suppose you want to install RAMDRIVE.SYS in expanded memory and allocate 4 MB (4096K) of expanded memory to the RAM disk. To do this and to specify that RAMDRIVE.SYS is located in the DOS directory on drive C, add the following line to your CONFIG.SYS file: device=c:\dos\ramdrive.sys 4096 /a Now suppose you want to allocate 1024K of extended memory to RAMDRIVE.SYS and create a RAM disk that has 512-byte sectors and a limit of 1024 entries in its root directory. To do this and to specify that RAMDRIVE.SYS is located in the DEVICES directory on drive D, add the fol- lowing line to your CONFIG.SYS file: device=d:\devices\ramdrive.sys 1024 512 1024 /e