Historical: Linux-based prototype
Memory Guard
This page documents the earlier Linux-based prototype as of 24 November 2026. It does not describe the independent Khelforge OS, and its steps are not instructions for it. See the independent Khelforge OS.
Memory Guard is a part of Task Manager. It reports whether the system is short of memory. A separate developer command can limit how much memory a new program may take. Memory Guard changes nothing by itself. It is implemented and covered by unit tests. The limit command has never been run with its apply option in an automated test.
How it rates pressure
Section titled “How it rates pressure”Every few seconds it reads the Linux kernel’s memory pressure information and the free memory.
| Level | Meaning |
|---|---|
| Critical | Programs are waiting for memory a lot |
| Elevated | Programs are starting to wait, or little memory is available |
| Stable | No sign of a shortage |
| Unavailable | The kernel does not give the data |
The level changes only after several readings agree. During the first readings the label says ASSESSING. The switch on the page only shows or hides the panel alerts.
What it never does
Section titled “What it never does”- Kill or pause a process.
- Drop file caches or claim that clearing them helps.
- Change swap settings, compressed swap or kernel parameters.
It reads compressed swap (zram) and shows its size and algorithm. A compression ratio is shown only when enough is stored. The ratio is not the amount of memory saved, and the page says so.
Memory profiles
Section titled “Memory profiles”A developer command can start a new program with a memory profile. It exists only in a source build, which is private.
| Profile | Limit for the new program |
|---|---|
game |
None |
balanced |
A soft ceiling |
background |
A lower soft ceiling |
By default the command only prints the plan. A soft ceiling can slow the program down. It is not a promise of better game performance.
How it was tested
Section titled “How it was tested”Unit tests use recorded samples for pressure and compressed swap, and they passed. The plan-only mode and wrong input are covered. The apply option has not been run in any test.
Known limitations
Section titled “Known limitations”- Levels depend on kernel support. A kernel without pressure information shows unavailable.
- The limits are suggestions from a development test, not measured for games.
- Profiles do not affect programs that already run.
- The page has no history beyond the chart.
- The interface has no button for applying a profile.
What is planned
Section titled “What is planned”Measuring the effect on real systems and tests with a screen reader are planned. Other performance ideas are in the memory page.