Contrib: Avoid losing mmaps when restarts generator.