Increase available memory - ghaerr/elks GitHub Wiki
There are cases when we want to increase the memory available to applications. One such example is ElksDoom. We can either decrease the memory used by Elks or utilize previously unused memory. The amount of free memory can be seen with the command meminfo
.
Configure the kernel at boot
In /bootopts
file you can set the following parameters:
task=6 buf=8 cache=4 file=20 inode=24 heap=15000 n
in order to decrease the system memory occupied by ELKS. The 'n' at the end is passed to /bin/init and says not run /etc/rc.sys. Note that this can interfere with some applications such as nxstart
. Currently nxstart
is unable to start other nano-X applications with this reduced memory configuration.
Load an application with init
You can skip bash
at start-up to free additional memory and reduce fragmentation of memory.
Instead of:
init=/bin/sash
you can put:
init=/pathto/elksdoom.os2
The disadvantage is that if you decide to exit Doom you won't be able to return to the console.
Disable unused features
This requires a recompilation of the kernel. In the case of ElksDoom you can disable:
- networking by disabling CONFIG_INET and/or CONFIG_ETH in .config (enabled by default).
- floppy track caching by disabling CONFIG_TRACK_CACHE in .config, which will slow down program loading, but will save an additional 9K of RAM.
Use UMB memory
If your hardware or emulator allows it, you can use unused UMB memory. This can sometimes allow for up to 96K additional RAM. Please see the dedicated page: Access-to-UMB-memory
Use HMA memory
On 286 and above you can use the 64 kb after the first 1MB by enabling hma=kernel
in /bootopts
Use XMS memory
On 286 and above you can use XMS memory used disk buffers and RAM drive. Use xms=on
in /bootopts
On a 16MB 386 you can get 3MB of RAM disk:
ramdisk /dev/ssd make 3072
mkfs /dev/ssd 3072
fsck -lvf /dev/ssd
mount /dev/ssd /mnt
df /dev/ssd
...
umount /dev/ssd
ramdisk /dev/ssd kill