As I understand, methods like MemoryStack#malloc(int) are supposed to be gc-free only if EA eliminates actual ByteBuffer creation? And for that to happen, developer should be really careful about passing allocated buffer to other methods. For example, harmless-looking call to java.lang.System#identityHashCode or any other native method accepting Java class reference will lead to object escaping and thus some amount of garbage? I suspect that since LWJGL natives accepts only long addresses that is not the case here but any other native method call can be non gc-free, right?
If that is the case - how reliable is current Java's EA?
And was there any ideas about creation of additional org.lwjgl.system.MemoryAccess.MemoryAccessor implementation with some buffer instance caching?