Javadoc
Returns a size of the allocated value in bytes. When called from
AllocationListener#onEnter(com.oracle.truffle.api.instrumentation.AllocationEvent) an
estimated size of the allocated value is provided. When called from
AllocationListener#onReturnValue(com.oracle.truffle.api.instrumentation.AllocationEvent)a corrected size can be provided, which might differ from the one reported in
AllocationListener#onEnter(com.oracle.truffle.api.instrumentation.AllocationEvent). When the allocated size is unknown,
AllocationReporter#SIZE_UNKNOWN is
returned. The change in memory consumption caused by the allocation is
#getNewSize() -
#getOldSize()
when both old size and new size
are known. The change can be either positive or negative.