RFR(s): various stringStream issues

Thomas Stüfe thomas.stuefe at gmail.com
Thu Jun 27 15:32:55 UTC 2019


Sorry, wrong webrev link, this one is correct:

http://cr.openjdk.java.net/~stuefe/webrevs/8224213--various-stringstream-issues/webrev.00/webrev/

On Thu, Jun 27, 2019 at 1:54 PM Thomas Stüfe <thomas.stuefe at gmail.com>
wrote:

> Hi all.
>
> this is a smallish change which rewrites stringStream to achieve two goals:
>
> - have a buffer size cap in dynamic mode: faulty - or just very chatty -
> printing code can use up lots of memory, and we have no inbuilt limit. We
> should have one. This is similar to
> https://bugs.openjdk.java.net/browse/JDK-8220394
>
> - Since 8224193, stringStream uses no resource area anymore as backing
> buffer but C-heap. To reduce the number of malloc calls for small instances
> of this stream I added a small internal buffer to be used for small output.
>
> I rewrote stringStream to be more in line with how the rest of our code
> looks today (constness, initializer lists etc).
>
> I also tweaked the tests a lot and believe this code pretty well tested.
>
> JBS: https://bugs.openjdk.java.net/browse/JDK-8224213
> webrev:
> http://cr.openjdk.java.net/~stuefe/webrevs/8224213-stringstream-maxcap/webrev.00/webrev/index.html
>
> Thank you, Thomas
>


More information about the hotspot-runtime-dev mailing list