title: Is it possible to reduce GhostScript memory?
body: <p>The command is like this:</p>
  
  <blockquote>
    <p>gs -q -dSAFER -dBATCH -dNOPAUSE -dPDFSETTINGS=/prepress -sDEVICE=pdfwrite -sOutputFile=output.pdf 1.pdf 2.pdf ... N.pdf</p>
  </blockquote>
  
  <p>Each input PDF contains many images, and most images are shared among input PDFs.</p>
  
  <p>The command runs successfully. Memory usage increases incrementally, and finally reaches 3.7GB.
  I have tried various PDFSETTINGS: prepress / printer / ebook / screen. The max memory did not reduce.</p>
  
  <p>I want to know is it possible to reduce GhostScript memory usage? Longer CPU processing time is acceptable.</p>
  
  <blockquote>
    <p>$ gs -v
    GPL Ghostscript 9.25 (2018-09-13)
    Copyright (C) 2018 Artifex Software, Inc.  All rights reserved.</p>
  </blockquote>