Memory usage discrepancy

Running with --heap-size-hint=1G and a GC.gc() after the optimization takes place solved the issue. It is now a steady 1.7 GB.