compose MemorySegments

Douglas Surber douglas.surber at oracle.com
Fri Jun 11 16:47:17 UTC 2021


I could use something that worked for whole-page chunks. My current block size is arbitrary. It was chosen (as Lee suggested) to minimize the number of fields that span boundaries while still being reasonably small. I don't have statistics to prove it's optimum, but we haven't seen any evidence suggesting its way wrong. If 4k pages were supported I could just as easily choose that as my block size if the generated code efficiently spanned block boundaries. This assumes that allocating and releasing pages is reasonably efficient. We avoid both (that's the point of this whole mechanism) but it does matter some.

Douglas

On Jun 11, 2021, at 9:28 AM, panama-dev-request at openjdk.java.net<mailto:panama-dev-request at openjdk.java.net> wrote:

The tricks we'd need to play (if we can assume aligned, whole-page chunks,
anyway) are available to us in user-space via the mmap(2) system call.
The RUMA paper shows how you can build dynamic data structures on top of
this:
http://www.vldb.org/pvldb/vol9/p768-schuhknecht.pdf


Very interesting, thanks for sharing!
I was assuming arbitrary buffers based on my reading of the OP.
Requiring allocations in page units seems very reasonable nowadays with 4
KB pages.
I suppose a specialized page-allocator capable of "merge" and "swap" would
be an incredible API.

--
Pedro Lamar?o
https://www.prodist.com.br<https://www.prodist.com.br/>
Securing Critical Systems
Tel: +55 11 4380-6585

Antes de imprimir esta mensagem e seus anexos, certifique-se que seja
realmente necess?rio.
Proteger o meio ambiente ? nosso dever.
Before printing this e-mail or attachments, be sure it is necessary.
It is in our hands to protect the environment.




More information about the panama-dev mailing list