RFR: 8319117: GrowableArray: Allow for custom initializer instead of copy constructor [v2]

Johan Sjölen jsjolen at openjdk.org
Tue Oct 31 22:30:13 UTC 2023


On Tue, 31 Oct 2023 14:26:05 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:

>> src/hotspot/share/memory/allocation.hpp line 500:
>> 
>>> 498:     return ptr;
>>> 499:   }
>>> 500: 
>> 
>> This should probably be a separate RFE.
>
> I think this change should not be made.  Callers should be using global placement new.  That's what we
> do everywhere else this comes up.  (It has always seemed like a bug to me that the operation "global
> placement new" is syntactically an allocation function, and so subject to this kind of name lookup
> collision, when it doesn't allocate.)

Hi,

100% agree. To be frank, I simply forgot that we had access to the global placement new through prepending `::`.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/16409#discussion_r1378220733


More information about the hotspot-dev mailing list