Skip to content

Commit

Permalink
set a memory threshold for loading headshots
Browse files Browse the repository at this point in the history
  • Loading branch information
slogan621 committed Mar 26, 2021
1 parent 0fd9458 commit ae72031
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,7 @@ public void startNextHeadshotJob()
ActivityManager.MemoryInfo memoryInfo = getAvailableMemory();

if (memoryInfo != null) {
if (!memoryInfo.lowMemory && ((float) memoryInfo.availMem / memoryInfo.totalMem) < 0.75) {
if (!memoryInfo.lowMemory && ((float) memoryInfo.availMem / memoryInfo.totalMem) < 0.2) {
HeadshotImage hs;
if (m_headshotJobs.size() > 0) {
hs = m_headshotJobs.remove(0);
Expand Down

0 comments on commit ae72031

Please sign in to comment.