# Interpretation of memallocs returned by @timed

**URL:** <https://discourse.julialang.org/t/interpretation-of-memallocs-returned-by-timed/8968>\
**Category:** Performance\
**Created:** [February 10, 2018, 1:54am UTC](https://discourse.julialang.org/t/interpretation-of-memallocs-returned-by-timed/8968 "2018-02-10T01:54:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![goerz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/goerz/32/3269_2.png) [@goerz](https://discourse.julialang.org/u/goerz)\
**Post date:** [February 10, 2018, 1:54am UTC](https://discourse.julialang.org/t/interpretation-of-memallocs-returned-by-timed/8968/1 "2018-02-10T01:54:32Z")

</div>

I was trying to find some information about the memory allocation counters that the `@timed` macro returns. These should probably be explained in the documentation of `@timed`. I did find some comments in the source code for the returned data structure:

```
struct GC_Diff
    allocd ::Int64 # Bytes allocated
    malloc ::Int64 # Number of GC aware malloc()
    realloc ::Int64 # Number of GC aware realloc()
    poolalloc ::Int64 # Number of pool allocation
    bigalloc ::Int64 # Number of big (non-pool) allocation
    freecall ::Int64 # Number of GC aware free()
    total_time ::Int64 # Time spent in garbage collection
    pause ::Int64 # Number of GC pauses
    full_sweep ::Int64 # Number of GC full collection
end

```

Would anyone be able to explain in a bit more detail how these should be interpreted? Which of these are particularly interesting from a performance perspective? Coming from Fortran, I’d basically want to know how many times the equivalent Fortran code would call `allocate` (i.e., array allocations, as opposed to allocations for scalar variables). Is this `bigalloc`? What are pool allocations, conceptually?
