digama0 / mmj2

mmj2 GUI Proof Assistant for the Metamath project
GNU General Public License v2.0
72 stars 25 forks source link

Increase maximum Java memory to 2 Gibibytes #34

Closed david-a-wheeler closed 4 years ago

david-a-wheeler commented 4 years ago

Increase the maximum Java memory to 2 Gibibytes (2G) when running using the provided Windows batch files. Without this change, mmj2 can fail on Windows due to a lack of memory when processing set.mm.

The file set.mm keeps getting bigger, and mmj2 includes an Early parser (which uses more memory), so the old maximum of 512 Mebibytes (512M) can lead to failure on startup when processing set.mm.

This commit increases the maximum to 2 Gibibytes. This seems to be enough to handle set.mm. This maximum is a strain for 32-bit systems, but such systems are disappearing, and by the time we might need to re-raise it I don't expect 32-bit systems to be in use for this purposes.

This commit does not change the starting memory size, just the maximum, because a user might choose a database other than set.mm which doesn't require a lot of memory.

Signed-off-by: David A. Wheeler dwheeler@dwheeler.com

digama0 commented 4 years ago

any particular reason the units are in lowercase now? Uppercase makes more sense for me since that's the way SI does it.

david-a-wheeler commented 4 years ago

Fair enough. Also, it appears the 2G is too much for 32 bit Windows and not needed. I'll make another PR when I get a chance

david-a-wheeler commented 4 years ago

I'll create a new pull request that increases the maximum to 1280 Mebibytes. That seems to be a "safe maximum on all systems" while still being plenty roomy for set.mm.

david-a-wheeler commented 4 years ago

I had switched the case only because the Java documentation seems to use lowercase by convention. But I think the SI convention is more important to follow, and seems to be well-supported.