Skip to content
Commit bdf5fa34 authored by Jan Sebechlebsky's avatar Jan Sebechlebsky
Browse files

Do not preallocate memory in default constructor of {Int,Long}Array

By heapdump examination this saves not-an-insignificant amount of
memory and significant amount of allocations.
Similar change was also introduced for ArrayList & HashMap
implementation in JDK8.

More details in go/if-xr-android-util-collections-lazy-init.

Bug: 272467748
Test: Verified system server heapdump
Change-Id: Ic852ef5e44678bbaf1dec721f8bdf8d0e88c800e
parent 1180a7f1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment