-
-
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 additional allocation statistics #10824
Comments
Yup, the first version allocates a temporary. |
Correct, but we are planning to change that (#3701). Also, allocation reported by In the future, please put backticks around code; otherwise writing |
Thanks for the reply. So how do I know if the memory is reused later on? The Thanks and keep up the good work. |
How do you mean? |
Stefan, here is my issue. My question is regarding Jeff's comment: "If we allocate 100 bytes, then free it, then allocate another 100 bytes, we report 200 bytes of allocation." How do I separate cases when 200 bytes of allocation is because I didnt free the memory or julia didnt reuse the memory, allocated a new chunk and grew the memory footprint? Do I need to add I find the summary reporting of valgrind in C programs easier to spot memory leaks and observe total memory consumption. |
We could just collect and report more statistics, in particular the number of bytes freed. |
That would be a nice feature for memory profiling! |
|
Thanks, I will give it a try! |
For
a=rand(6,1);
@time command shows different behavior when
a[1:3] = a[4:6]
vs
for i=1:3
a[i]=a[i+3];
end
with respect to memory allocation. The first copy allocates fresh memory each time the command is called (not even reusing the previous temporary allocation). Is this behavior expected?
The text was updated successfully, but these errors were encountered: