The JVM increases the heap size when required to the maximum heap size that you set. It does not take up all the memory, since it has to pre-install it at startup, and you might want to use some memory for something else, like stream stacks, shared libraries, heap memory, etc.
Why doesn't Java expand the heap size until it reaches the memory limit of the process installed by the OS, just like the .NET CLR does?
If you set the maximum heap size large enough, or use the heap memory, it will. By default, this will not be done. One of the reasons is that the heap memory must be in the main memory and cannot be replaced without losing the performance of your computer (unless you kill your computer). This does not apply to C programs, and the extension is so strong that it cannot expand.
If you have a JVM with a heap size 10% larger than the main memory, and you use so much as soon as you run the GC, which should touch each page more than once, you will probably find the information you need to power the loop .
Linux has a killer process when resources run out and it doesnβt cause you may have enough luck to restart.
Is this just a JVM developer policy or is it an advantage of the .NET CLR architecture over the JVM one
A key feature of the JVM is that it is platform independent, so it has its own control. A JVM running at the limit of your process space will most likely not allow your computer to run (from a heavy replacement). I do not know that .NET is avoiding this.
In other words, if Oracle engineers want to implement automatic heap extensions for the JVM, can they do it?
This is already the case, as I said, it is simply not recommended to allow it to use too much memory.