Skip to content

Increase available memory

Gregory Haerr edited this page Sep 24, 2024 · 15 revisions

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.

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 allow 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