Historical: Linux-based prototype
Memory, pressure and zram
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 reads memory pressure and gives advice. It never ends a program, clears a cache or changes a system setting. A separate developer tool can start a new program with a soft memory limit. That tool is not part of the installed desktop. Neither part has been measured with a game.
Why pressure and not percentage
Section titled “Why pressure and not percentage”A high percentage of used memory is normal, because Linux keeps files in memory and gives that space back when needed. The useful question is whether programs are waiting for memory. Linux answers it with pressure stall information, or PSI. “Some” is the share of time that at least one task waited. “Full” is the share of time that all active tasks waited. They are not percentages of memory.
How Memory Guard decides
Section titled “How Memory Guard decides”| Result | Meaning |
|---|---|
| CRITICAL | Programs are waiting for memory a lot |
| ELEVATED | Programs are waiting for memory at a lower level, or little memory is available |
| UNAVAILABLE | The kernel gives no pressure data |
| STABLE | None of the above |
A change needs several readings in a row. Until then Task Manager shows ASSESSING. The advice tells the user to review large apps, or to save work and close unused apps normally. Memory Guard covers the interface.
Khelforge reports compressed swap devices: the number active, the compression algorithm, stored and allocated size, and the ratio. The ratio is hidden while very little is stored, because tiny amounts give meaningless figures. The ratio is not physical memory saved.
Khelforge does not set up zram or swap. The installer creates an EFI partition and a root partition, with no swap partition, and offers no zram package.
Memory profiles
Section titled “Memory profiles”A developer tool can start a new program with a memory profile.
| Profile | Soft limit |
|---|---|
| Game | None. Memory use is only accounted |
| Balanced | A soft limit on memory |
| Background | A lower soft limit on memory |
A soft limit slows a program that goes over it and does not end it.
- It never touches a program that is already running.
- The user chooses the profile. Nothing detects a game, and nothing limits background apps automatically.
How it was tested
Section titled “How it was tested”Automated tests cover the results, the several-readings rule, damaged zram data and the start of new programs. They use dry runs only, so no limit was applied. The page in Task Manager was later checked by the offscreen GUI tests and on the development display.
Known limitations
Section titled “Known limitations”- A soft limit can stall the program it applies to. It is not a general frame rate improvement.
- The memory shown per process counts shared pages more than once. The values must not be added up.
- The profile limits are testing defaults, not tuned values.
- Behaviour under real memory pressure has not been tested.