RFR: 8314294: Unsafe::allocateMemory and Unsafe::freeMemory are slower than malloc/free
Dean Long
dlong at openjdk.org
Fri Oct 6 22:18:52 UTC 2023
On Fri, 6 Oct 2023 13:20:19 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
> @mcimadamore setMemory and copyMemory are targeting Java arrays not native memory so they have to be safepoint-aware and so cannot be leaf operations.
I think the key requirement is that they not run in the "native" state. If we had a compiler intrinsic then it should be able to run in the in_Java state. Offering a safepoint seems optional, depending on how much data is being modified.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/15977#issuecomment-1751457450
More information about the hotspot-dev
mailing list