summaryrefslogtreecommitdiff
path: root/tools/aapt2/java/JavaClassGenerator_test.cpp
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2016-02-24 16:56:42 -0800
committerDianne Hackborn <hackbod@google.com>2016-02-25 13:00:56 -0800
commit970510b9c5299d480b3ec7f8403afd8265456f87 (patch)
tree871cc076519bb32d670164ee9c7427ce80181bf9 /tools/aapt2/java/JavaClassGenerator_test.cpp
parenta52cce2c84ce0e9c0cf5b1fb56628088aed259f2 (diff)
Work on issue #26390161: Throttle syncs/jobs when system is low on RAM
We now have a fixed array of job service contexts, which doesn't vary by build configuration. Instead, we keep track of the maximum number of concurrent jobs we want to allow to run, and don't make use of a context if it would put us over that limit. The available contexts is now 8 (the largest used to be 6), although the maximum we will normally schedule is still 6. We have the other two around only for use by the current foreground app, to allow it to schedule work while the user is in it, even if we have reached our normal limit on the number of concurrent jobs. The maximum number of concurrent jobs varies based on the memory state of the device, from 6 (if memory is normal) down to 1 (if memory is critical). We aren't yet trying to stop all jobs if memory gets lower than critical. Instead of just keeping track of whether a uid is in the foreground, we now track whether it is the top as well. Only the top uid can schedule additional jobs above the current limit. Also improved some of the dumpsys output. Change-Id: Icc95e42231a806f0bfa3e2f99ccc2b85cefac320
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator_test.cpp')
0 files changed, 0 insertions, 0 deletions