On Fri, 22 Jan 2021 07:29:22 GMT, Lin Zang <lz...@openjdk.org> wrote:

>> The check here is to control the segment size. It checks whether the current 
>> segment is too large, if yes, it fills the segment size slot in 
>> fillInHeapRecordLength() and set  currentSegmentStart = 0, meaning to create 
>> a new segment for following data write.
>> And thanks to point it out, there should be a similar control logic in 
>> exitSegmentMode(), otherwise there is possibility of super huge segment.
>
> Just double checked the current implementation of segmentedOutputStream, it 
> flush segmented data every time the exitSegmentMode() is called, so there can 
> not be a super huge segment.
> But the code is still required to control the size of segmented data to not 
> be too small. 
> Thanks!

Ok

-------------

PR: https://git.openjdk.java.net/jdk/pull/1712

Reply via email to