How can I measure, how much memory a Clojure program uses?
I've noted that even small programs, that say make something like
(println "Hello World")
can consume tens of megabytes of RAM, according to time (GNU time), ps and other tools like that.
Is there any correct method to detect how much memory a Clojure program really need?
How can I limit memory usage for a Clojure program? Is it possible to say something like "take no more than 1 MB"?
time -v
, or usejmap
, that is not the problem at all. The question is how can I get my program under 20MB – Malka