-
Notifications
You must be signed in to change notification settings - Fork 8
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
Free Memory not matching well with what device claims #8
Comments
The package is showing unused memory instead of available memory. Device settings and most apps typically display available memory, which is the amount that can be reclaimed for use. Unused memory refers to memory that isn't currently occupied but isn't necessarily available for allocation. Available memory is the more relevant value in most cases. |
@corepuncher in the interest of time, I have forked and added a new method: After testing on 3 different Android devices, I can confirm it exactly shows the available RAM equal to what other "diagnostic apps" on PlayStore show. I have also uploaded it to pub.dev (https://pub.dev/packages/system_info3) |
This will be very helpful! Your work is very much appreciated. For iOS, I wonder if I could make an educated guess, based on the model of the device perhaps. |
That might be your only way for now. From my brief review of the package code, iOS has limited support (if any), with most functions implemented for Android, Linux, Windows, and macOS. That's why I removed iOS as a supported platform on pub.dev. While I add more relevant functionality to the package, I’ll look into iOS implementation also. Any help is appreciated :) |
If you post a pr I will publish it. |
Hi @bsutton |
Ta.
…On Thu, 14 Nov 2024, 2:54 pm Aditya Kasibhatla, ***@***.***> wrote:
Hi @bsutton <https://github.com/bsutton>
Since I noticed the package hadn't been updated in 18 months, I forked the
repo and made several updates (to metadata, README, name, etc.), then
republished it. I'll create a branch compatible with this repo by
cherry-picking the relevant changes and submit a PR. Thanks
—
Reply to this email directly, view it on GitHub
<#8 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAG32OFBYTCQ7L3GTMJJYJT2AQNI3AVCNFSM6AAAAABIPXYS2OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINZVGM2TSOBVGM>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Hello. Perhaps this is just a misunderstanding on my part but I have the following:
int freePhysicalMemory = SysInfo.getFreePhysicalMemory();
I get a value of 1.4 GB (profile mode)
and (0.8 GB in debug mode).
But if I minimize the app and go into memory settings (Galaxy S23_+), it shows the following:
2.9 GB available,
4 GB used
1.1 GB reserved
And prior to the app running, the device shows 3.4 GB available.
I'm trying to maximize the "safe" amount of memory to use in my app for caching data before clearing the cache.
Currently the values are too low it seems compared to what it "could" be using. Any advice on this? Thank you!
The text was updated successfully, but these errors were encountered: