Access to XMS memory - ghaerr/elks GitHub Wiki
The XMS memory is the one after the first 1024 + 64 KB of memory and usually available only on 286 and above. XMS can be used for disk buffers and/or RAM drive. It is not directly available to programs. If you have a program that needs more memory, you can write you own disk swapping algorithm that works on a RAM drive.
One idea is to have for example /tmp/swap as a central place for disk swapping for programs. On old systems it will be a real disk swapping and on newer systems such as 286 the /tmp/swap will be mapped to an XMS RAM drive which will automatically speed up the swapping without any changes in the code.
Boot options
- Set
xms=on
in /bootopts to enable XMS memory access
ELKS XMS support is totally automatic when xms=on
where the proper mode of operation, i.e. unreal mode (for 80386+) or LOADALL (for 80286) is used. To force INT 15 on real hardware, use xms=int15
.
Configure RAM disk
ramdisk /dev/ssd make 3072 #map /dev/ssd as a RAM disk with size 3MB
mkfs /dev/ssd 3072 #create minix filesystem
mount /dev/ssd /mnt
df /dev/ssd
...
umount /dev/ssd
ramdisk /dev/ssd kill #do not use /dev/ssd as RAM disk