summaryrefslogtreecommitdiff
path: root/annotations/generate_annotated_java_files.py
diff options
context:
space:
mode:
authorHans Boehm <hboehm@google.com>2018-10-12 16:51:35 -0700
committerHans Boehm <hboehm@google.com>2018-12-12 21:11:14 -0800
commit1ab882b3c38b24c180511a6022dde12774bea794 (patch)
treebb4ae24a6fb46bb643694d79d6cc936f98be8d61 /annotations/generate_annotated_java_files.py
parente3222b5cb448648eba92a8192f6660570040bb21 (diff)
Adjust NativeAllocationRegistry for new accounting
Provide a new NativeAllocationRegistry constructor that does not require a size, assuming instead that all native allocation goes through malloc() and the GC tracks native allocation anyway. Use it in BigInt, Pattern, and Matcher, the traditional problem cases for proper size tracking. We should use it in many other cases as well. The fact that we're not yet doing so has the effect that we're currently double-counting some allocations. However a mere factor of 2 error is likely to be a huge improvement already over prior accounting. Force the argument to setTargetHeapUtilization to be at least 0.1. Very small numbers are not reasonable, and could cause overflows in ART. (Needed by accounting cleanups in the companion ART CL.) Bug: 111447610 Test: atest NativeAllocationRegistryTest (option 2) Test: Built and booted AOSP. Ran 175-alloc-big-bignums. Change-Id: Iad76e1efe0849ddf03834571f71a00e684e82858
Diffstat (limited to 'annotations/generate_annotated_java_files.py')
0 files changed, 0 insertions, 0 deletions