diff --git a/README.md b/README.md index 084ffa5..dcf968c 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,7 @@ smart people at [Hashrocket](http://hashrocket.com/). - [Open JavaDocs](clojure/open-javadocs.md) - [Quick Clojure Docs](clojure/quick-clojure-docs.md) - [Reductions](clojure/reductions.md) +- [Set Max Heap Size](clojure/set-max-heap-size.md) - [Specify the Directory of a Shell Command](clojure/specify-the-directory-of-a-shell-command.md) - [Splitting On Whitespace](clojure/splitting-on-whitespace.md) - [Swap Two Items in a Vector](clojure/swap-two-items-in-a-vector.md) diff --git a/clojure/set-max-heap-size.md b/clojure/set-max-heap-size.md new file mode 100644 index 0000000..235058c --- /dev/null +++ b/clojure/set-max-heap-size.md @@ -0,0 +1,11 @@ +# Set Max Heap Size + +For `lein`-based projects, the maximum heap size can be set by including the +`-Xmx` option in the `jvm-opts` portion of the `project.clj` file. For +instance, to set the maximum JVM heap size to 2 gigabytes, include: + +```clojure + :jvm-opts ["-Xmx2g"] +``` + +in your `project.clj` file.