RFR: 8286180: Enable construction of LogStreamImpl from LogMessageImpl [v5]
Johan Sjölén
duke at openjdk.java.net
Tue May 24 13:45:36 UTC 2022
On Tue, 24 May 2022 07:08:15 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> Johan Sjölén has updated the pull request incrementally with three additional commits since the last revision:
>>
>> - Use unary not instead of comparing to false
>> - Sort includes
>> - Style changes
>
> src/hotspot/share/logging/logStream.hpp line 160:
>
>> 158: const size_t minimum_capacity_needed = _pos + len + 1;
>> 159: try_ensure_cap(minimum_capacity_needed);
>> 160: // try_ensure_cap may not have enlarged the capacity to the full requested
>
> Would it be worth having `try_ensure_cap` return a boolean to indicate whether it was able to expand to the size requested?
I did this and also took the time to refactor `try_ensure_cap`, I think it reads more easily now.
-------------
PR: https://git.openjdk.java.net/jdk/pull/8748
More information about the hotspot-runtime-dev
mailing list