https://github.com/Macaulay2/M2/issues/500 says there it's the Boehm GC being configured for small memory by default. They say setting the environment variable GC_INITIAL_HEAP_SIZE (to like "50G") helps. Not sure why. Also, there's an environment variable GC_MAXIMUM_HEAP_SIZE.