Question

Wikipedia on Heap lists down many implementations of heap. I was thinking as to what implementation does Java use for heap?

Is the decision kept on the JVM vendors or it is specified in JVM specification as to what implementation should be used?

Was it helpful?

Solution

None of them. The heap in the Wiki entry you cited is a binary tree-based sorting data structure. The heap used by the JVM is a dynamic memory area. The Wiki-type is implemented by java.util.Heap, not by the JVM's heap. I know it's confusing but there it is. Note that the Wiki entry has a disambiguating note at the top.

OTHER TIPS

The heap type is a decision of the JVM implementor. The JVM spec on heaps gives no indication as to a required or preferred type of heap.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top