[foreign] RFR : Move array-like methods from Pointer to Array

Maurizio Cimadamore maurizio.cimadamore at oracle.com
Mon Nov 19 16:24:51 UTC 2018


On 19/11/2018 16:01, Jorn Vernee wrote:
> I think the API is inherently unsafe, unless you strictly stay on the 
> Java side, but that kind of defeats the point. 

Yes and no.

Consider the use case of a programmer that is only interested in the off 
heap aspect, but not in the native interop use case. Actually, this is 
going to be more common than you seem to imply (in recent conferences 
I've seen several frameworks attempting to reduce GC pressure by 
allocating off heap).

If that's the case, it would be nice if we could guarantee absence of VM 
crashes - after all we know what's being allocated, and how long the 
pointers will be alive for.

Maurizio



More information about the panama-dev mailing list