-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Track-allocation is underreporting memory usage #18595
Comments
I think this is how track-malloc is supposed to work. It doesn't count allocations multiple times so the real allocation needs to be found in the functions you call (most likely P.S. the allocation in your function is actually in the first line and it's fixed on master (likely by #18520). |
@yuyichao I am not sure I understand. There are two distinct allocations happening, not one.
|
Correction, inlining doesn't really matters here. In any case, what I mean is that it's meant to be like this because the allocation happens in another function. It's arguable not too useful this way (especially since the allocation you see in is also wrong and should actually go to another function). |
Here is a little snippet
If I ran this with the
--track-allocation=all
option, I get the following output from the@time
macroThe
.mem
file that is generated looks likeSo it is only detecting half the memory being allocation. But more alarmingly on the wrong line number. It completely missed allocation associated with
x[1:end-1]
on the fifth line.P.S. I am running this on "Version 0.5.1-pre+1" under Ubuntu 14.04.
The text was updated successfully, but these errors were encountered: