I’m currently a bit perplexed by `--track_allocation=user`

while I’m writing a blog post about BenchmarkTools and profiling.

My test code is:

```
function get_primes(to)
possible_primes = collect(2:to)
# iterate over the primes and remove multiples
i = 1
while i <= length(possible_primes)
prime = possible_primes[i]
possible_primes = filter(n->n <= prime || n % prime != 0, possible_primes)
i += 1
end
return possible_primes
end
```

which is a very suboptimal solution to the problem and can be easily fixed with using `filter!`

… So I encountered that it takes >700MiB of allocations for computing the primes up to 100,000.

I assumed to see a big number next to the line:

```
possible_primes = filter(n->n <= prime || n % prime != 0, possible_primes)
```

when running it with `julia --track-allocation=user`

Unfortunately it shows:

```
- function get_primes(to)
800080 possible_primes = collect(2:to)
- # iterate over the primes and remove multiples
- i = 1
0 while i <= length(possible_primes)
0 prime = possible_primes[i]
0 possible_primes = filter(n->n <= prime || n % prime != 0, possible_primes)
0 i += 1
- end
0 return possible_primes
- end
```

which obviously doesn’t explain the memory allocations.

Am I doing something wrong?

Appreciate your help and I might send you the blog post for proofreading when you’re able to help me out