# Peak memory

**URL:** <https://discourse.julialang.org/t/peak-memory/9856>\
**Category:** New to Julia\
**Created:** [March 21, 2018, 12:29pm UTC](https://discourse.julialang.org/t/peak-memory/9856 "2018-03-21T12:29:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pier](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pier/32/7335_2.png) [@Pier](https://discourse.julialang.org/u/Pier)\
**Post date:** [March 21, 2018, 12:29pm UTC](https://discourse.julialang.org/t/peak-memory/9856/1 "2018-03-21T12:29:57Z")

</div>

Maybe a silly question but is there a way to know the peak memory (not the total allocated memory) occupied during the execution of a julia function? (under Windows if possible)  
Thanks.

---

<div class="post-metadata">

**Author:** ![jameson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jameson/32/23_2.png) [@jameson](https://discourse.julialang.org/u/jameson)\
**Post date:** [March 23, 2018, 6:54pm UTC](https://discourse.julialang.org/t/peak-memory/9856/2 "2018-03-23T18:54:57Z")

</div>

The unix `time` program can report this (sometimes with an extra flag, such as `/usr/bin/time -l`). I don’t know of the corresponding Windows capability.

---

<div class="post-metadata">

**Author:** ![Pier](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pier/32/7335_2.png) [@Pier](https://discourse.julialang.org/u/Pier)\
**Post date:** [March 23, 2018, 7:39pm UTC](https://discourse.julialang.org/t/peak-memory/9856/3 "2018-03-23T19:39:47Z")

</div>

Thanks for the reply. /usr/bin/time would certainly be an option but I thought that the GC would also keep track of the peak memory.
