[foreign-memaccess+abi] RFR: 8313238: Improve the performance of strlen for null-terminated strings [v3]
Per Minborg
pminborg at openjdk.org
Mon Aug 7 11:12:47 UTC 2023
On Mon, 7 Aug 2023 10:58:05 GMT, Per Minborg <pminborg at openjdk.org> wrote:
>> src/java.base/share/classes/jdk/internal/foreign/StringSupport.java line 123:
>>
>>> 121: segment = segment.asSlice(start);
>>> 122: }
>>> 123: long len = segment.byteSize() < MAX_TRIVIAL_SIZE
>>
>> When calling `strlen` should it be considered if segments is heap or off-heap?
>
> The linker can call native methods where the segment is heap-based too.
Or, no. You are right. We have to handle this separately.
-------------
PR Review Comment: https://git.openjdk.org/panama-foreign/pull/857#discussion_r1285723294
More information about the panama-dev
mailing list