# Memory allocation, where are the .mem files

**URL:** https://discourse.julialang.org/t/memory-allocation-where-are-the-mem-files/5538
**Category:** General Usage
**Created:** [August 24, 2017, 3:38pm UTC](https://discourse.julialang.org/t/memory-allocation-where-are-the-mem-files/5538 "2017-08-24T15:38:07Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Ward9250](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ward9250/32/42768_2.png) [@Ward9250](https://discourse.julialang.org/u/Ward9250)
#### Post date: [August 24, 2017, 3:38pm UTC](https://discourse.julialang.org/t/memory-allocation-where-are-the-mem-files/5538/1 "2017-08-24T15:38:07Z")

</div>

Hi,

I wanted to track the memory allocated by a function I’ve written for a package. I’ve read the docs about the track allocation flag and have done the following:

```nohighlight
N82106:Desktop bward$ julia --track-allocation=user

```

```julia
julia> using BioSequences

julia> using GeneticVariation

julia> cdn = DNACodon(0x000000000000000)
DNA 3-mer:
AAA

# Eval once to compile
julia> GeneticVariation.expected_NG86(cdn, 1.0, GeneticVariation.DEFAULT_TRANS)
(0.3333333333333333, 2.6666666666666665)

julia> Profile.clear_malloc_data()

julia> GeneticVariation.expected_NG86(cdn, 1.0, GeneticVariation.DEFAULT_TRANS)
(0.3333333333333333, 2.6666666666666665)

julia> exit()

```

But I get no .mem file:

```nohighlight
N82106:Desktop bward$ ls *.mem
ls: *.mem: No such file or directory

```

What am I missing to make this work?

---

<div class="post-metadata">

### Author: ![thofma](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/thofma/32/1691_2.png) [@thofma](https://discourse.julialang.org/u/thofma)
#### Post date: [August 24, 2017, 3:44pm UTC](https://discourse.julialang.org/t/memory-allocation-where-are-the-mem-files/5538/2 "2017-08-24T15:44:53Z")

</div>

They are in the same directory as the source files.

---

<div class="post-metadata">

### Author: ![Ward9250](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ward9250/32/42768_2.png) [@Ward9250](https://discourse.julialang.org/u/Ward9250)
#### Post date: [August 24, 2017, 3:50pm UTC](https://discourse.julialang.org/t/memory-allocation-where-are-the-mem-files/5538/3 "2017-08-24T15:50:24Z")

</div>

Oh I see, they get added with source files of the _package_, I thought it would output a .mem file to the same place as my allocation testing script!

---

<div class="post-metadata">

### Author: ![thofma](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/thofma/32/1691_2.png) [@thofma](https://discourse.julialang.org/u/thofma)
#### Post date: [August 24, 2017, 6:13pm UTC](https://discourse.julialang.org/t/memory-allocation-where-are-the-mem-files/5538/4 "2017-08-24T18:13:46Z")

</div>

Yeah, sorry for being as unclear as the documentation.
