It’s supposed to be the number of bytes allocated on that line, but unfortunately it’s not super accurate, and often misses allocations. I wrote a bit about it in this post.
As for memory allocated where you think there shouldn’t be: You can verify with @time
that memory is indeed allocated there (just put @time
in front of those lines).
Unexpected allocations are often caused by type instability. Run @code_warntype
for your function and look for any instabilities (i.e. “::Any” colored in red).