diff options
author | Tobias Thierer <tobiast@google.com> | 2017-02-15 14:10:17 +0000 |
---|---|---|
committer | Tobias Thierer <tobiast@google.com> | 2017-02-15 14:30:28 +0000 |
commit | e2646922729f45e384b32406c5f0f55532d1a1a2 (patch) | |
tree | 166d38e00a5a48d5562d09a7568a66e127d78d35 /annotations/generate_annotated_java_files.py | |
parent | 7902c1300ebfe7fec9901cf11a2d12bfdb105a2c (diff) |
Simplify OldSystemTest.test_gc() and make it more robust
Prior to this CL, the test was doubling whatever amount of
memory was allocated (including garbage) before the test.
That allocated too much (exceed maxMemory, i.e. result in
OOME) if too much memory was already used.
Prior to http://r.android.com/215021 (commit
d9e9955288f7a2dff8eafd660d7a1108fde49bf5 ), the test was
allocating 2/3 of free memory up to the next GC watermark,
but that could allocate too little if memory was already
close to the watermark ahead of the test, in which case
the test could fail if a small amount of memory was
allocated anywhere during the test (bug 26155567).
To avoid both problems, this CL changes the test to always
allocate a flat 2 MiBytes.
Bug: 26155567
Bug: 34964016
Test: Ran CtsLibcoreTestCases 2x
Change-Id: I4d36b8cb077ba7041f935a02e53e3a426b8cdf8c
Diffstat (limited to 'annotations/generate_annotated_java_files.py')
0 files changed, 0 insertions, 0 deletions