Question: remove memory heap segments

Radosław Smogura mail at smogura.eu
Fri May 21 18:19:07 UTC 2021


Hi all,

I hope you have a good day.

I’m not sure if this topic was actually touched, however I wonder if heap memory segments are useful, as for me those creates more noise.

Let me explain my concern, (as probably you know) I try to write I/O layer with Panama (mainly for feedback purposes).

I thought about creating NativeInputStream with semantics similar to plain stream, but with segment instead of byte array.

However issue is that if user passes on heap segment I can’t downstream it to POSIX function.

I think this, slightly, can be headache for such purposes, and will lead to if trees and very minor performance degradation.

I think the need for checking if segment is native in the heap was as well expressed in https://mail.openjdk.java.net/pipermail/panama-dev/2021-May/013707.html

So that’s why I wonder about on-heap segments.

Kind regards,
Rado



More information about the panama-dev mailing list