#android#メモリ管理
1.255で全ラインスキップできる様になったのはいいですが、そもそもフリーズして進めなくなる現象に悩まされている方をあちこちでお見かけします。
キャッシュクリアで改善した方もいる様ですが、改善しなかった方も少なくない様子。
中には12GBの物理メモリ搭載しているモデルでもフリーズ、なんて方もいらっしゃる様です。
ところで興味本位でちょっとググってみた感じ、12GBみたいな大きな物理メモリを積んでいるからといって、一つのアプリで全部使えるわけじゃなくて、別に上限があるんですね。
どうやらスマホメーカーごとにパラメータが設定されているらしいのですが、ここ数年のハイエンド機では実際どのくらいに設定されているのでしょう?
もしメモリ不足が原因で挙動に問題が出ているなら見逃せない気もしますが、このあたり詳しい情報を持っている方がいたらぜひ教えてください!
Even if a phone has 12 GB of physical RAM, a single Android app cannot take it all.
Android enforces a per-app heap memory limit, which is much smaller:
> *Android sets a hard limit on the heap size allotted for each app. … If your app reaches the heap capacity and tries to allocate more memory, the system throws an `OutOfMemoryError`.*
<https://t.co/bQZdROV8lD>
Developers can request a larger heap with `android:largeHeap="true"`, but:
> *There is no guarantee how large the large heap will be.*
<https://t.co/l8umoxZ611>
So in practice, 12 GB of RAM mostly helps with multitasking and keeping more apps alive in the background, rather than letting a single app consume it all.