-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Out of Memory (Only 512MB allowed??) #12411
Comments
We explicitly set largeHeap to true, which seems to be the maximum we can do - the actual memory allocated is an Android internal setting |
Clearly I'm not either or I would've known this. It looks like the only "great" way to tackle this is multiprocessing, which for a project like this.... Sounds like an astonishingly bad idea. Second initial thought far from a computer... Chunking? Possibly iterate chunks and render each Chunk before moving onto the next, loading and parsing a small portion of the save file at a time. If I poke around with a c# server at some point it might be manageable to test question mark? I tried decoding a save file to see if the theory holds water, butI'm assuming its a collection of bespoke structs/objects just base64 encoded? Though this just kicks the can down the road unless its integrated whole hog (minecraft style dynamic load/unload) Sorry, I guess I'm just barfing thoughts out loud that I can't test until I'm back at a desktop pc lmao |
https://stackoverflow.com/questions/73262584/how-do-you-go-over-512mb-of-memory-in-an-android-app As far as I can see:
|
Is there an existing issue for this?
Game Version
4.14.2-patch1
Describe the bug
According to the stack heap, only 512MB of memory is allowed for use?
Is this a design choice, or just a compatibility choice?
I'm not familiar with Java, but C# I am very familiar with, so if this is something I need to eventually look into, I will. It just seems ridiculous that 512MB is a cap with no option (or memory size auto adaption) to increase max allowed (my phone has 12GB!).
For context, I am playing an 80 size map with max Ai (and that's even too small for me!) because I really enjoy putting "grand" in "grand strategy"; and totally nothing like the masochism of playing a few minutes at a time on my phone during breaks waging full scale 3 pushing 4 digit unit wars.
Way off in a foxhole, I know unciv servers are (for the most part) glorified file hosts. If I ever get time to sit down at a computer again, I've thought once or twice about looking into fragmented saves for multi-player games.
Steps to Reproduce
Play 100 turns into an 80 size map wtih max AI on marathon with standard settings.
Screenshots
No response
Link to save file
No response
Operating System
Android
Additional Information
Platform: Android
Version: 4.14.2-patch1 (Build 1,065)
Rulesets: [Civ V - Vanilla, Civ V - Gods & Kings]
Last Screen:
com.unciv.ui.screens.worldscreen.WorldScreen
Device Model: SM-S908U1
API Level: 34
System Memory: 11213 MB
Available (used by Kernel): 3270 MB
System Low Memory state: false
Java heap limit: 512 MB
Java heap free: 0 MB
Message:
Save Mods:
Save Data:
Show Saved Game
The text was updated successfully, but these errors were encountered: