Skip to content

Instantly share code, notes, and snippets.

@andreasnoack
Created February 22, 2017 01:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andreasnoack/52027e05d62a65d0c8c077ebdf1cf91e to your computer and use it in GitHub Desktop.
Save andreasnoack/52027e05d62a65d0c8c077ebdf1cf91e to your computer and use it in GitHub Desktop.
Memory debuggin in Julia
Yichao:
1. no need to edit any code
2. compile it with `WITH_GC_DEBUG_ENV` make variable
this should enable detection of 4 envs
and turn on gc verifier
(so the gc will be much slower even without any env set)
the three I used the most often are `JULIA_GC_ALLOC_PRINT=0:10 JULIA_GC_ALLOC_OTHER=r0:1000 JULIA_GC_ALLOC_POOL=r0:1000`
(not the default val, just whatever copied from my cmdline history)
Andreas:
so just something like `cd src;make clean;make WITH_GC_DEBUG_ENV=1` should do it?
Yichao:
right
format is, "r"(optional, randomize interval when specified)
and `start[:step[:end]]`
step default to 1
end default to max int
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment