Say I have three Java applications; A
and B
are 32 bit, C
is 64 bit. All of them are configured with
maxHeapPercent = 50
maxHeapSize = 1024
which reads "50 percent of available memory no less than 1024 MB", according to the documentation. Now my question is, what will happen if I run these applications on the same machine?
- Say the machine has 16GB RAM, will those "50%" add up to 3x8GB=24GB, which is more than available?
- Or do
A
andB
(being 32 bit applications!) only allow 4GB each, using 2GB of it? Ending up at 2x2GB+1x8GB=12GB? Or 2x4GB+1x8GB=16GB, leaving nothing for the OS? - Will any of this force a crash and/or an
OutOfMemoryError
? Or will it just force swapping?