As the slider rounds to the nearest power of 2, it can round up to the next power of 2, even when this is greater than the total physical memory available. Fixing this should be a simple Math.min(memory.ceiling, memory.max) after rounding.
This should change the slider color and display a warning about java's rare power-of-2 requirement.