Reduce the initial size of the buffer to 512 bytes.

The allocateDirect() reduce the churn of passing a byte[] from Java to native. However, it's only useful for pushed atoms. In the case of pulled atom, the allocateDirect doesn't help anything as the data is later copied to a new array in build().

Unfortunately, we cannot distinguish pushed from pulled case in StatsEvent unless we introduce a new API. For now, lower the initial buffer size to limit the impact on the non movable memory space.

Bug:366165284
Change-Id: I4e971902f98414a88df6cf033a21aa9da95c24b6
1 file changed