Skip to content

Free Memory not matching well with what device claims #8

@corepuncher

Description

@corepuncher

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions