NTT DATA Interview Question

How JVM allocated memory?