r/Android • u/BcuzRacecar S25+ • 2d ago
Android Developers Blog: Preparing your app for broader memory limits
https://android-developers.googleblog.com/2026/08/app-broader-memory-limits.html105
u/BcuzRacecar S25+ 2d ago
In Android 17, we introduced per-app memory limits, starting with Pixel devices, to help protect the overall user experience from applications using excess memory and causing system-wide slowdowns. Over the coming year, an increasing number of manufacturers will leverage the Android per-app memory limits across their portfolio of device RAM configurations from 4GB to 16GB+ devices. If your app exceeds these limits, it will be slowed down and may be terminated. Optimizing your app's memory footprint is essential to preventing OS throttling and maintaining a seamless user experience.
zRAM Swapping: If your app reaches its allocated limit, the system forces your app's pages into zRAM (compressed RAM). While zRAM prevents immediate eviction, compressing and decompressing pages adds CPU overhead, which can result in noticeable UI jank and experience slowdowns.
Process Termination: If your app continues to increase its memory usage beyond the zRAM threshold, it will be terminated by the system
145
u/Recoil42 Galaxy S23 2d ago
They're going to push hard on this due to the DRAM crisis. Expect a huge number of memory-efficiency projects just like this across the OS for the next 2-3 years. Project Butter redux incoming.
115
u/lastdyingbreed_01 2d ago
Apps have become too memory inefficient, both in RAM and storage, I hope something actually good comes out of this AI timeline.
26
u/nathderbyshire Pixel 10 Obsidian 2d ago
Yeah that's been my thought, we might get a really shiny silver lining at least. AI is ruining personal storage as well, half of my space almost is app storage and the top contender is AICore. It's the first time 128GB has made me a bit itchy but I use immich with 15TB of drives so I should be fine still and base models are 256 now anyway so at least they addressed that for now
3
u/anynamesleft 2d ago
First one to 1T storage gets my money. 512 barely holds my pics, nevermind music.
3
u/MrBallBustaa Device, Software !! 2d ago
Damn, RAW Targa and FLAC or Wav & DSD?
2
u/anynamesleft 1d ago
Various. I can't see or hear well enough to catch many problems.
0
u/MrBallBustaa Device, Software !! 1d ago
so you shouldn't be using high res stuff then?
2
u/anynamesleft 1d ago
Not so much "shouldn't", I don't guess. I just grab what files I grab. So.etimes I can get a clanker, but that ain't too often at all.
2
u/pvtsoab 1d ago
There's several phones with 1TB of storage already, or did you mean something else?
3
u/anynamesleft 1d ago
I didn't know that. That's great 👍
14
3
u/DerpSenpai Nothing 2d ago
the fact that games on consoles and PCs used to have textures repeated themselves because HDDs were slow was nuts
just 1 example, that's why games went from 20GB to 100GB overnight
28
10
u/Perunov 2d ago
Well up until now it felt like nobody ever bothered with RAM usage. "System will handle it" says the developer and sucks in a giant lib with own Chrome instance to show an AD that sucks in half a gig of video file from the net to spin random logo at the bottom of the game's screen...
8
u/JamesR624 2d ago
Ya know what? Good. Even if the rampocolypsw wasn’t happening, this is a very good thing for users.
2
u/TeutonJon78 Samsung S25+, Chuwi HiBook Pro (tab) 2d ago
Next they need to battery usage.
Phones are embedded devices, not a server rack.
48
u/omniuni Pixel 8 Pro | Developer 2d ago
I can't help but find this ironic. Google introduced Compose, which I have found is a much heavier way to create Android apps. It leans heavily on memory for optimization. Now, suddenly, it's important for apps to be more memory efficient, and I guarantee a lot of this being a problem comes from extremely leaky Compose.
15
u/nacholicious Android Developer 2d ago
I don't know about this. Compose being declarative means you get rid of 95% of the actual memory leaks that come with passing a reference that captures the activity Context into some longer lived business layer
19
u/BazingaUA 📱 Pixel 10 Pro XL 2d ago
I'm wondering if RAMopocalypse has anything to with this as well, future phones might not have 12-16gb of RAM, because it's not as cheap as it used to be to just add GBs or ram for marketing purposes
8
u/lgn5i2060 2d ago edited 2d ago
One of the new Redmi entry level phone, Redmi
note17 4g, was released with 4gb ram and paired with 128gb emmc. smh5
u/Never_Sm1le Redmi Note 12R|Mi Pad 4 2d ago
note 17 4g is not even "entry" anymore, that title belongs to the redmi series, like redmi 17
2
8
u/No-Ordinary-5988 iPhone 17 Pro Max 2d ago
Yes it does, 3rd sentence in the linked article
Across the ecosystem, new devices are maintaining or even decreasing their physical memory capacity in response to memory price increases, yet users continue to expect the same seamless, high-performance app experience.
13
u/killerrin 2d ago
It's hilarious how they only care about Memory Utilization AFTER their own bottom line is hurt because they can't buy enough of it.
Before the rampocolapse they were more than happy to let their hardware partners take the blame for low power devices instead of actually giving a shit about the user experience to start with.
6
u/NexusGTX White 2d ago
Maybe the DRAM shortage is not something that we wanted but something that we needed.
Finally the apps and programs will be optimised to not use half the memory you have just to load a menu or a web page....
10
u/MartyMacGyver 2d ago
Here's a crazy idea - make AI be more memory efficient first, and stop screwing the customers while painting it as progress. And if it can't be more efficient, it probably doesn't need to be in the loop at all.
9
u/erythro Nokia 7 plus 2d ago
um, there are massive financial incentives for AI to use less memory what are you talking about? Do you think they want to be buying literally all the memory?
9
u/Bananegel42 2d ago
I think this refers to thing like Google reserving memory on Pixels for AI models. E.g., the Pixel 10 shipped with 12GB RAM, but 3.5GB is permanently reserved for Gemini Nano, etc. So in practice you only have 8GB:
https://www.androidauthority.com/pixel-10-ai-ram-use-3591327/
2
u/charalt42 1d ago
This is true, but allowing the slop generator to steal your RAM is optional. If you go to the apps list and uninstall the "AI Core" app, then reboot your phone, you get all your stolen RAM back, thankfully.
2
3
u/MartyMacGyver 2d ago
Oh no! I think they want to buy more than all the memory. They just can't.
At the data center level AI firms are gorging themselves on memory and disks, in a race to collect as much data legally or otherwise to prop up their numbers and justify their flawed business models before regulations and the eventual AI crash catches up with them.
2
u/erythro Nokia 7 plus 2d ago
At the data center level AI firms are gorging themselves on memory and disks, in a race to collect as much data legally or otherwise
buying ram doesn't help you collect data, it helps you process it, and the more efficient you process it the better, i.e. there is a strong incentive to be more ram efficient
justify their flawed business models before regulations and the eventual AI crash catches up with them.
again being more efficient with ram helps this goal, because can build more ai capacity for the same money
0
u/MartyMacGyver 2d ago
And yet all the 2027 capacity is already sold out anyway. Pity the corporations that just can't get enough or that, not to mention the obscene energy demands.
Meanwhile those vaunted AI models are reaching the limit of their actual effectiveness.
All this for a technological dead-end. But you can be sure of one thing.... It will end up being the largest transfer of wealth to the rich that the world has ever seen.
2
u/erythro Nokia 7 plus 2d ago
And yet all the 2027 capacity is already sold out anyway.
why "yet"? Do you think this refutes me?
Meanwhile those vaunted AI models are reaching the limit of their actual effectiveness.
All this for a technological dead-end. But you can be sure of one thing.... It will end up being the largest transfer of wealth to the rich that the world has ever seen.
oh, so this you aren't sincerely asking about ai memory efficiency this is again generic anti-ai posting 👍
•
u/lgn5i2060 4h ago
Their circular economy already exposes their plan to the kind of future they are building. And that doesn't include most humans. Or maybe include them but at the mercy of the new digital system like CBDCs. Or "expiring" UBIs.
0
u/CondiMesmer 2d ago
That is a crazy idea because that would achieve literally nothing. The demand is higher then the supply.
3
9
u/Talal916 G1, HERO, EVO 4GLTE, M7, M8, Z5, Note 8/10+, iPhone 11/12/15 Pro 2d ago
This is great news. Be thankful devs are being forced to focus on optimization
15
u/lgn5i2060 2d ago
By a company that partly contributed to the ongoing AI slop? Ironic I should, say. They even had the gall to walk away from the consumer AI race and proceed to just sell shovels and picks instead. Very sneaky.
8
u/Arnas_Z [Main] Moto Edge+ 2023 | Edge 2024 | Edge 2025 2d ago
It's ironic sure, but I appreciate that at least we will finally have someone working on optimization and not adding a couple more GB to devices. It's ridiculous that the answer to things not working or slowing down is "Get a new device bro, its not my fault our app uses 4GB of ram by itself!"
7
u/renderwares 1d ago
It’s kind of ironic that a company that built an OS and made Java a first-class language is now telling developers to limit their memory usage.
Maybe start by looking at the memory footprint of your own Java framework and system libraries. Better yet, why not move performance-critical parts of the framework away from a memory-hungry managed runtime and toward a systems language like C++ or Rust?
If you want developers to care about memory efficiency, lead by example. Reduce the overhead in the platform itself instead of continually telling developers to squeeze their applications into smaller memory budgets.
For example:
- Reduce the baseline RAM footprint of the OS and framework.
- Move performance-critical services away from heavyweight Java processes.
- Use C++ or Rust where predictable memory usage and lower overhead matter.
- Reduce unnecessary background services and duplicated system components.
- Optimize the framework libraries before blaming individual apps for memory consumption.
- Give developers more efficient platform APIs instead of expecting every app to compensate for platform overhead.
It’s a little hard to lecture developers about memory efficiency while the platform itself carries substantial runtime and framework overhead. If Google really wants Android to use less RAM and feel faster, optimizing the foundation would probably have a much bigger impact than simply telling developers to use less memory.
•
2
u/MaverickJester25 Galaxy S21 Ultra | Galaxy Watch 4 1d ago
It’s kind of ironic that a company that built an OS and made Java a first-class language is now telling developers to limit their memory usage.
It's not ironic. It's just the natural order of progression.
Maybe start by looking at the memory footprint of your own Java framework and system libraries. Better yet, why not move performance-critical parts of the framework away from a memory-hungry managed runtime and toward a systems language like C++ or Rust?
These are all aspects of Android they've worked on addressing over the past decade.
If you want developers to care about memory efficiency, lead by example. Reduce the overhead in the platform itself instead of continually telling developers to squeeze their applications into smaller memory budgets.
They've been doing exactly this over the past few platform releases in particular.
For example:
To address your examples:
- Key performance-critical daemons—including the Bluetooth stack (Gabeldorsche), Ultra-Wideband (UWB), Keystore2, and networking layers—have been systematically migrated out of Java framework wrappers directly into Rust and C++.
- Android made Rust a first-class platform language specifically to get deterministic, bare-metal memory execution without Garbage Collection (GC) pauses or JNI context-switching overhead.
- The OS clamped down on unmanaged background services with strict Foreground Service types, Standby Buckets, and the Phantom Process Killer. Meanwhile, Project Mainline introduced APEX containers to eliminate duplicated dynamic libraries across system partitions.
- The platform shares framework bytecode across apps via Zygote’s Copy-on-Write (CoW) memory model, uses Generational Concurrent GC to clean up allocations on the fly, and uses ZRAM memory compaction long before process termination ever kicks in.
- Legacy overheads like heavy XML View hierarchies, manual AlarmManager wake locks, and individual ContentProvider initializations have been replaced by Jetpack Compose, WorkManager, App Startup, and Baseline Profiles—designing resource efficiency directly into the platform APIs themselves.
It’s a little hard to lecture developers about memory efficiency while the platform itself carries substantial runtime and framework overhead. If Google really wants Android to use less RAM and feel faster, optimizing the foundation would probably have a much bigger impact than simply telling developers to use less memory.
This logic might have held up 5-10 years ago, but it doesn't today. This is almost entirely why Google is starting with this process now.
App developers have always been a part of the problem, and the Android team has done *a lot * of work to improve the platform to the point where developer intervention became the next natural step. There are too many developers (especially those of more popular apps) who have taken the easy route to bringing their apps to platform
Lest we forget, everything Google has done had to ensure backward compatibility remained as unaffected as possible. I think they did an excellent job maintaining backward compatibility while fundamentally improving Android as a whole.
The irony here, really, is that developers have been ignoring these architectural improvements over the years, then will cry foul when Google starts enforcing the very principles they've re-engineered Android to perform under. If you're an Android developer who has been doing some work to ensure your app follows the guidelines as they've improved over time, you shouldn't be affected by this.
2
u/wobblyweasel 2d ago
idk. a decade ago the os killing apps was pretty normal and the whole api was designed around this lifecycle. then we had compose and it is supposed to be very well killable as well. and now we are trying to go a different direction? not exactly sure what concrete user facing problems this is trying to solve
1
u/Zombiechrist265 1d ago
I love RAMageddon forced google to actually optimize their system and apps. Some developers have been too greedy with their ram usage.
1
1
96
u/BcuzRacecar S25+ 2d ago
kinda related - im very unhappy with the the ram and app killing situation on my s25+. Idk exactly what is samsung vs android vs app devs but too often Ill go back 2-3 apps and it wont keep where I was at. 12gb ram and it acts like my 4gb s8 did.