From working process standpoint everything is simply a heap, where by Java runtime process allocates many of its space as "non-heap" memory for processed bytecode. Rest of that OS-level heap is used as application-stage heap, the place object's knowledge are stored. this isn't the situation OP was facing as well https://manuelydfca.jts-blog.com/35397976/the-definitive-guide-to-stack-ball-speed-mode