# Memory Debugging

**URL:** <https://discourse.julialang.org/t/memory-debugging/5067>\
**Category:** General Usage\
**Created:** [July 25, 2017, 7:50pm UTC](https://discourse.julialang.org/t/memory-debugging/5067 "2017-07-25T19:50:13Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Michael\_Eastwood](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/michael_eastwood/32/669_2.png) [@Michael\_Eastwood](https://discourse.julialang.org/u/Michael_Eastwood)\
**Post date:** [July 25, 2017, 8:08pm UTC](https://discourse.julialang.org/t/memory-debugging/5067/2 "2017-07-25T20:08:23Z")

</div>

I had a similar-looking problem where memory use seemed to grow linearly with time. I managed to simplify the code to the point where I could reproduce the “memory leak” with a 3-line for loop. This was instrumental in helping me identify the problem.

Linking my solution on the off-chance that it’s relevant.

> [@\[Solved\] Debugging an apparent memory leak](https://discourse.julialang.org/t/solved-debugging-an-apparent-memory-leak/1828):
>
> Hello all, I have a problem on Julia v0.5 that I need some advice on how to debug. The essential problem is that I have a script that takes several hours to run. As the script is running, the memory usage of each worker slowly grows until the machine runs out of memory and my script is killed. Then I get sad because I wasted several hours. Without reproducing all of the details, the essential structure of the code looks like: function do\_the\_thing() @sync for worker in workers() @…

---

_[View the full topic](https://discourse.julialang.org/t/memory-debugging/5067)._
