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?

Était-ce utile?

La 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.

Autres conseils

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.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top