Just trying to learn from sun.misc.Unsafe low-level java operations. I read this article , but my question is related to the benefits of using Unsafe.
In this example. Player p = (Player) unsafe.allocateInstance(Player.class);Where is the object created? Is JVM heap or non-heap direct memory?
Are all the operations that are described in the distribution articles not heaps? I ask about this because when you use the "new" keyword, it must create an instance on the heap. If so, then what is the actual advantage, because then it does not bypass the GC.
source
share