Sorry I meant PagedGrowableWriter, not PagedMutable. The reason why
RamUsageEstimator gives a different result is that it relies on Unsafe
to compute field offsets (RamUsageEstimator.JvmFeature.FIELD_OFFSETS,
when this feature is disabled, RamUsageEstimator agrees with
PagedGrowableWriter.ramBytesUsed), so it seems to me that there is no
real need to fix this method without using Unsafe and reflection.
Since constant deltas don't matter for this method, I will just relax
the test a bit and just ensure it is not too far from the actual
result.

--
Adrien

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to