RFR: 8354969: Add strdup function for ResourceArea [v5]

David Holmes dholmes at openjdk.org
Fri May 16 06:35:52 UTC 2025


On Thu, 15 May 2025 11:17:34 GMT, Anton Artemov <duke at openjdk.org> wrote:

>> Added a strdup() method, as requested by the bug reporter. The method is added to Arena, but also available in ResourceArea, as requested. A test for the method is provided. 
>> 
>> Testing: tiers 1-4 on multiple platforms.
>
> Anton Artemov has updated the pull request incrementally with one additional commit since the last revision:
> 
>   8354969: Fixed new lines

Looks good! Thanks for the update.

One further, non-essential, suggestion.

src/hotspot/os/windows/perfMemory_windows.cpp line 1610:

> 1608:   //
> 1609:   char* rfilename = ResourceArea::strdup(filename);
> 1610:   char* robjectname = ResourceArea::strdup(objectname);

As we have `TRAPS` available we could use the thread taking variant and save the call to `Thread::current`

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

Marked as reviewed by dholmes (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/24998#pullrequestreview-2845636033
PR Review Comment: https://git.openjdk.org/jdk/pull/24998#discussion_r2092417022


More information about the hotspot-dev mailing list