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
Loading
Please register or sign in to comment