4

How to Set JVM Memory for Clojure REPL in Emacs (clojure-jack-in, clojure-swank)

 2 years ago
source link: https://blog.jakubholy.net/2012/06/30/how-to-set-jvm-memory-for-clojure-repl-in-emacs-clojure-jack-in-clojure-swank/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

How to Set JVM Memory for Clojure REPL in Emacs (clojure-jack-in, clojure-swank)

June 30, 2012
How to increase heap size for Clojure REPL started from Emacs, either standalone or as a part of a project.

1. Clojure REPL Started for a Lein Project

If you have a Leiningen 2.0 project and start Clojure REPL for it in Emacs via M-x clojure-jack-in then you can set JVM arguments such as heap size in the project.clj:

(defproject cascalog-comoyo "0.1.0-SNAPSHOT"
; ...
:jvm-opts ["-Xmx768M"])

2. Clojure REPL Started Outside of Lein

If you use Jake McCrary's clojure-swank operation to start Clojure REPL in Emacs without having a Leiningen project then you can set JVM options by adding them to the shell-command call in clojure-swank's definition:

...
(shell-command "JAVA_OPTS='-Xmx768M' ~/.lein/bin/swank-clojure &" buffer))
...
Tags: clojure

Are you benefitting from my writing? Consider buying me a coffee or supporting my work via GitHub Sponsors. Thank you! You can also book me for a mentoring / pair-programming session via Codementor or (cheaper) email.

Allow me to write to you!

Let's get in touch! I will occasionally send you a short email with a few links to interesting stuff I found and with summaries of my new blog posts. Max 1-2 emails per month. I read and answer to all replies.

Copyright © 2022 Jakub Holý
Powered by Cryogen
Theme by KingMob

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK