-
Notifications
You must be signed in to change notification settings - Fork 4
Expanding RAM with swapfile
Warning
Welcome to the danger zone! Before proceeding, please keep in mind that tempering your phone's system will void your warranty and potentially render it unbootable if done incorrectly. PROCEED WITH CAUTION AND AT YOUR OWN RISK. It's recommended to back up your data first.
KaiOS, being the successor of Firefox OS, relies on the Gecko browser engine to run apps written in light-weight web technologies. It runs quite efficiently most of the time, despite having as little as 256MB of memory.
But in rare cases, as with other operating systems, the phone can handle as much before it starts killing system processes to avoid RAM overflow. To overcome this constraint, KaiOS pulls the Linux trick and compresses some of the RAM data into a zRAM image that resides within the RAM itself. While the compressed zRAM is faster as it directly uses the RAM, it takes up about half of its space, leaving just the other half for active tasks.
Creating a swapfile on your phone's internal storage and direct the system to use that swapfile instead of built-in zRAM would free up that half of your RAM, leaving room for more processes and possibly make the phone faster and more capable—though you'll have to trade off a tiny degradation in speed, some storage space and storage chip longevity.
Working on it...
This documentation page is written on the courtesy of the BananaHackers team, 2018–present.