# How to analyse module memory usage/memory leak?

**URL:** https://discourse.julialang.org/t/how-to-analyse-module-memory-usage-memory-leak/31706
**Category:** General Usage
**Tags:** question, module, memory
**Created:** [December 1, 2019, 3:36am UTC](https://discourse.julialang.org/t/how-to-analyse-module-memory-usage-memory-leak/31706 "2019-12-01T03:36:44Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![squaregoldfish](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/squaregoldfish/32/2363_2.png) [@squaregoldfish](https://discourse.julialang.org/u/squaregoldfish)
#### Post date: [December 1, 2019, 3:36am UTC](https://discourse.julialang.org/t/how-to-analyse-module-memory-usage-memory-leak/31706/1 "2019-12-01T03:36:44Z")

</div>

I’m trying to analyse the memory usage of a module I’ve written, named InterpolationData. Calling varinfo(InterpolationData) gives the following:

> julia\> varinfo(InterpolationData)  
> name size summary  
> ––––––––––––––––––––– ––––––––– –––––––––––––––––––––––  
> Cell 232 bytes DataType  
> InterpolationCellData 264 bytes DataType  
> InterpolationData 6.540 MiB Module  
> interpolatecell 0 bytes typeof(interpolatecell)  
> makecells 0 bytes typeof(makecells)

and the documentation says that this gives the memory usage of “exported global variables”. Clearly the stuff I’m interested in (6.54 MiB) doesn’t qualify. What’s the best way to have a look inside the module and see what it’s up to? I have a memory leak somewhere, and I’d like to see what Julia thinks is using the memory.
