$ clj -Sdeps "{:deps {com.clojure-goes-fast/clj-memory-meter {:mvn/version \"0.1.0\"}}}"
Clojure 1.9.0
;; Nevermind the warning, it doesn't break the library.
user=> (require '[clj-memory-meter.core :as mm])objc[59881]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.8.0_102.jdk/Contents/Home/bin/java (0x1089814c0) and /Library/Java/JavaVirtualMachines/jdk1.8.0_102.jdk/Contents/Home/jre/lib/libinstrument.dylib (0x10d9dc4e0). One of the two will be used. Which one is undefined.nil
user=> (mm/measure (vec (range 100000)))"2.8 MB"
user=> (mm/measure (list 1 2 3 4 5) :debug true)
root [clojure.lang.PersistentList] 320 bytes (40 bytes) | +--_first [java.lang.Long] 24 bytes (24 bytes) | +--_rest [clojure.lang.PersistentList] 256 bytes (40 bytes) | +--_first [java.lang.Long] 24 bytes (24 bytes) | +--_rest [clojure.lang.PersistentList] 192 bytes (40 bytes) | +--_first [java.lang.Long] 24 bytes (24 bytes) | +--_rest [clojure.lang.PersistentList] 128 bytes (40 bytes) | +--_first [java.lang.Long] 24 bytes (24 bytes) | +--_rest [clojure.lang.PersistentList] 64 bytes (40 bytes) | +--_first [java.lang.Long] 24 bytes (24 bytes)
"320 B"
user=> (def mm (filter even? (range 100000)))
#'user/mm
user=> (mm/measure mm)
"160 B"
user=> (count mm)
50000
user=> (mm/measure mm)
"1.8 MB"
user=> (def nn (drop 25000 mm))
#'user/nn
user=> (mm/measure nn)
"1.8 MB"
user=> (mm/measure [mm nn])
"1.8 MB"
user=> (def mm nil)
#'user/mm
user=> (mm/measure nn)
"1.8 MB"
user=> (System/gc)
nil
user=> (mm/measure nn)
"1.8 MB"
user=> (count nn)
25000
user=> (mm/measure nn)
"940.3 KB"
;; Still shared though!
clj -Sdeps "{:deps {com.clojure-goes-fast/clj-memory-meter {:mvn/version \"0.1.0\"}}}"--You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@googlegroups.com
Note that posts from new members are moderated - please be patient with your first post.
To unsubscribe from this group, send email to
clojure+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Could you try that again and immediately after getting the exception from the require, type in:
*e
(instead of trying the mm/measure call)
In the exception that prints out, look for the Caused by portion of the exception. That’s going to be the underlying exception that will help us help you debug this.
Also, what version of Java are you using? (java -version)
Sean Corfield -- (970) FOR-SEAN -- (904) 302-SEAN
An Architect's View -- http://corfield.org/
"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood
--