increasing-the-jvm.dita 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
  3. <!-- This file is part of the DITA Open Toolkit project. See the accompanying LICENSE file for applicable license. -->
  4. <task id="t-increasing-the-JVM">
  5. <title>Increasing Java memory allocation</title>
  6. <titlealts>
  7. <navtitle>Increasing Java memory</navtitle>
  8. </titlealts>
  9. <shortdesc>If you are working with large documents with extensive metadata or key references, you will need to
  10. increase the memory allocation for the Java process. You can do this from the command-line prompt for a specific
  11. session, or you can increase the value of the <codeph>ANT_OPTS</codeph> environment variable.</shortdesc>
  12. <prolog>
  13. <metadata>
  14. <keywords>
  15. <indexterm>macOS<indexterm>increase Java memory</indexterm></indexterm>
  16. <indexterm>Linux<indexterm>increase Java memory</indexterm></indexterm>
  17. <indexterm>Windows<indexterm>increase Java memory</indexterm></indexterm>
  18. <indexterm>command line<indexterm>increase Java memory</indexterm></indexterm>
  19. <indexterm>operating system<index-see>Linux</index-see><index-see>macOS</index-see><index-see>Windows</index-see></indexterm>
  20. <indexterm>Java<indexterm>memory</indexterm></indexterm>
  21. <indexterm><codeph>ANT_OPTS</codeph></indexterm>
  22. <indexterm>Java<indexterm><codeph>ANT_OPTS</codeph></indexterm></indexterm>
  23. <indexterm>metadata<indexterm>processing time, effect on</indexterm></indexterm>
  24. <indexterm>memory</indexterm>
  25. </keywords>
  26. </metadata>
  27. </prolog>
  28. <taskbody>
  29. <steps-unordered>
  30. <step>
  31. <cmd>To change the value for a specific session, from the command prompt, issue the following command:</cmd>
  32. <choicetable>
  33. <chhead>
  34. <choptionhd>Platform</choptionhd>
  35. <chdeschd>Command</chdeschd>
  36. </chhead>
  37. <chrow platform="unix">
  38. <choption>Linux or macOS&#xA0;</choption>
  39. <chdesc><codeph>export ANT_OPTS=$ANT_OPTS -Xmx<varname>1024</varname>M</codeph></chdesc>
  40. </chrow>
  41. <chrow platform="windows">
  42. <choption>Windows</choption>
  43. <chdesc><codeph>set ANT_OPTS=%ANT_OPTS% -Xmx<varname>1024</varname>M</codeph></chdesc>
  44. </chrow>
  45. </choicetable>
  46. <info>
  47. <p>This increases the JVM memory allocation to 1024 megabytes. The amount of memory which can be allocated is
  48. limited by available system memory and the operating system.</p></info>
  49. </step>
  50. <step>
  51. <cmd>To persistently change the value, change the value allocated to the <codeph>ANT_OPTS</codeph> environment
  52. variable on your system.</cmd>
  53. </step>
  54. </steps-unordered>
  55. </taskbody>
  56. </task>