Some Androids do it. Motorola calls it "RAM Boost". It is basically a swap.
No Stupid Questions
No such thing. Ask away!
!nostupidquestions is a community dedicated to being helpful and answering each others' questions on various topics.
The rules for posting and commenting, besides the rules defined here for lemmy.world, are as follows:
Rules (interactive)
Rule 1- All posts must be legitimate questions. All post titles must include a question.
All posts must be legitimate questions, and all post titles must include a question. Questions that are joke or trolling questions, memes, song lyrics as title, etc. are not allowed here. See Rule 6 for all exceptions.
Rule 2- Your question subject cannot be illegal or NSFW material.
Your question subject cannot be illegal or NSFW material. You will be warned first, banned second.
Rule 3- Do not seek mental, medical and professional help here.
Do not seek mental, medical and professional help here. Breaking this rule will not get you or your post removed, but it will put you at risk, and possibly in danger.
Rule 4- No self promotion or upvote-farming of any kind.
That's it.
Rule 5- No baiting or sealioning or promoting an agenda.
Questions which, instead of being of an innocuous nature, are specifically intended (based on reports and in the opinion of our crack moderation team) to bait users into ideological wars on charged political topics will be removed and the authors warned - or banned - depending on severity.
Rule 6- Regarding META posts and joke questions.
Provided it is about the community itself, you may post non-question posts using the [META] tag on your post title.
On fridays, you are allowed to post meme and troll questions, on the condition that it's in text format only, and conforms with our other rules. These posts MUST include the [NSQ Friday] tag in their title.
If you post a serious question on friday and are looking only for legitimate answers, then please include the [Serious] tag on your post. Irrelevant replies will then be removed by moderators.
Rule 7- You can't intentionally annoy, mock, or harass other members.
If you intentionally annoy, mock, harass, or discriminate against any individual member, you will be removed.
Likewise, if you are a member, sympathiser or a resemblant of a movement that is known to largely hate, mock, discriminate against, and/or want to take lives of a group of people, and you were provably vocal about your hate, then you will be banned on sight.
Rule 8- All comments should try to stay relevant to their parent content.
Rule 9- Reposts from other platforms are not allowed.
Let everyone have their own content.
Rule 10- Majority of bots aren't allowed to participate here. This includes using AI responses and summaries.
Credits
Our breathtaking icon was bestowed upon us by @Cevilia!
The greatest banner of all time: by @TheOneWithTheHair!
When you develop an Android app it follows a defined lifecycle. The app is notified about changing states and is supposed to persist it's data in some of them. So ideally you wouldn't even notice that the app was killed since it would continue exactly where it was killed.

This is it, and it's arguably a much better model. Apps are able to manage their own persistent storage, and you can always be sure that your RAM is actually RAM (and not deal with the speed and timing issues that result in you "RAM" actually being flash memory).
Problem is that it's not at all trivial to implement, so it often isn't implemented.
That's true. But it's also not trivial to implement an app that may have its "RAM" located on disk. It's a complex problem with multiple solutions, and giving apps the freedom to do what they want with it is the way Android structured things.
And here the Voyager lemmy community insists it's an OS issue.
That's because voyager is a web app. It is a well designed and integrated PWA which makes it look and feel close to a native mobile app. The above mentioned preferred solution is Android specific and many multiplatform apps skip such optimization.
Nice! Thank you! That puts a lot of things in their proper context!!
It's the app's responsibility, not the system's.
On a mobile, apps must be aware that they can get killed at any time.
Contact the developer of Voyager and request a feature to automatically save drafts. This is handled at the app level in Android, and it's 100% possible for the app to handle this transparently.
It's supposed to save drafts; it just didn't in my case, and in other people's cases as well.
The Voyager lemmy hasn't been too interested in my feedback.
Then I suggest using Interstellar if draft saving is important to you. I've never had an automatic draft fail to save on Interstellar.
Cool, thanks for the recommend.
I think I'll stick to Voyager for now and compose my longer drafts offline.
Jerboa did neither fail me on purging drafts no matter how often I paused and resumed it. But it's a native Android app.
That's a lot of read/write cycles to your storage for no real reason. Some phones do this now, though, bc android sucks with being resource heavy. They call it "16GB RAM with RAM boost" and it's usually 8GB + 8GB meaning that 2nd 8GB is like the ReadyBoost cache in Windows old days. It is using your local storage for extra RAM storage, but, again, that's a little ridiculous, personally.
My voyager will let me know my comment was recovered if I'm gone too long, so maybe that's a setting you can tweak.
2nd 8GB is like the ReadyBoost cache
RAM boost? ReadyBoost?
So it all just swap?

Yup, it's common on chinese phone/tablet where they advertised things with 16GB of ram while it's 8+8. First thing I disabled on my first phone that supported this fake RAM. This would be slow and kill your flash.
You wouldn't gain anything speed or durability wise from disabling swap. Normal ram is always the priority if it is available, so any time the phone retrieves data from the swap it avoids having to relaunch an app killed due to memory pressure, which would take longer. As Android is already pretty aggressive about killing apps to save battery, in the majority of cases the swap would be used to ease the blow of a sudden, memory intensive task like high resolution video editing.
Let's assume the phone storage can take 256 read write cycles (which is a low estimate). Considering that phones have at least 256 gigs of storage nowadays that gives an allowance of 18 gigs written per day for a phone with 10 year lifespan. Considering that I very rarely change the contents of the storage and the memory will likely not spill over by that amount, or at all most days, it's safe to say flash health isn't a concern.
The one time I did lose my draft, I couldn't get it back. There's no setting for memory on Android on Voyager.
So you're saying there is a swap file (I'm on a cheapier Samsung Tablet A right now), but even that's too small to hold much memory. I know in Windows you could set the size of the swap file; honestly, I'd much rather wait an extra second to get the program back into RAM than lose a draft, so I think there really must be a good technical reason it's not happening.
Idk the Samsung tablet. And yeah it might be device dependent, too. I guess I didn't think of that being the case.
I'm guessing it's more a matter of having a cheaper product with less RAM than it is about the manufacturer. I'm guessing the behavior is standard across all Android devices.
I believe in the developer setting you can set up howmuch you wish to store in memory and such. But this has an impact on your battery life.
Why does it necessarily have an impact on battery life? Can it just be dumped into memory and frozen there as a snap shot? It doesn't need to be running.
I'm not a computer scientist, but doesn't keeping RAM engaged cost energy? You can't turn off your computer and expect the RAM to be unaffected like a hard drive is
I think it costs electricity to flip bits, but unless things are moving, there's not much going on. If the app isn't actively being used, I was wondewring why it couldn't just get frozen in carbonite and dumped into storage until the user needed it again.
I see under memory only that I can turn of Memory Profiler, which I guess will tell me what's going on under the hood. Also looks like I have a whole 4G of memory, more than anyone would ever need! lol
Because Linux and Windows take a different approach to memory management.
And Android is based on Linux.
That function would seem like a last resort no-mem/no-swap situation would it not? Standard Linux server/desktop systems have a swap partition typically by default.
Thanks for that. Pretty cool how that works. Linux does have swap files, though.