[foreign-memaccess+abi] RFR: 8274287: Add a way to specify block size of unbounded arena allocator [v2]

Jorn Vernee jvernee at openjdk.java.net
Fri Sep 24 14:52:11 UTC 2021


On Fri, 24 Sep 2021 14:49:01 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

>> Following the discussion here:
>> 
>> https://mail.openjdk.java.net/pipermail/panama-dev/2021-May/013815.html
>> 
>> This patch renames arena allocator factories, to make room for new unbounded factory which allows clients to specify a custom block size.
>
> Maurizio Cimadamore has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Address review comments

src/jdk.incubator.foreign/share/classes/jdk/incubator/foreign/SegmentAllocator.java line 361:

> 359:      *     and set {@code S = S'}; the allocator then tries to respond to the same allocation request again.
> 360:      *     <li>if the size of the allocation requests is bigger than the size of {@code S}, allocate a new segment {@code S'}
> 361:      *     (using malloc), which has a sufficient size to satisfy the allocation request, and return {@code S'}.

Still a mention of `malloc` here, as well as in the same text for the other `arenaUnbounded` overload.

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

PR: https://git.openjdk.java.net/panama-foreign/pull/583


More information about the panama-dev mailing list