On Mon, 3 Oct 2022 13:37:25 GMT, Johan Sjölen <[email protected]> wrote:
>> Here's a suggested solution for the ticket mentioned and a use case for
>> outputStream. I'm not attached to the name.
>>
>> This saves space for all allocated outputStreams, which is nice. It also
>> makes the purpose of ResourceObj more clear ("please handle the life cycle
>> for me"), reducing the need for it.
>>
>> Thank you for considering it.
>
> Johan Sjölen has updated the pull request incrementally with one additional
> commit since the last revision:
>
> Add comment
src/hotspot/share/memory/allocation.hpp line 183:
> 181: }
> 182:
> 183: static ALWAYSINLINE void* operator new(size_t size,
Were you going to move MEMFLAGS to the second argument in the new operators
also?
src/hotspot/share/memory/allocation.hpp line 264:
> 262:
> 263: // Dynamically pick the memory flags at allocation
> 264: class CHeapObjDynamic {
This can be simply using CHeapObjDynamic = CHeapObjImpl; so not to repeat all
the various new operator declarations.
src/hotspot/share/utilities/ostream.hpp line 45:
> 43: // This allows for redirection via -XX:+DisplayVMOutputToStdout and
> 44: // -XX:+DisplayVMOutputToStderr
> 45: class outputStream : public CHeapObjDyn {
This should be CHeapObjDynamic.
-------------
PR: https://git.openjdk.org/jdk/pull/10412