On Thursday 29 August 2024 at 09:51:04 UTC-7 Georgi Guninski wrote:

I observe that the following does not leak: 

E=EllipticCurve([5*13,0]) #no leak 
rn=E.root_number() 


How do you know that doesn't leak? Do you mean that repeated execution of 
those commands in the same session does not swell memory use?
 

The size of the leak is suspiciously close to a power of two. 


I don't think you can draw conclusions from that. Processes generally 
request memory in large blocks from the operating system, to amortize the 
high overhead in the operation. It may even be the case that 128 Mb is the 
chunk size involved here! The memory allocated to a process by the 
operating system isn't a fully accurate measure of memory allocation use in 
the process either: a heap manager can decide it's cheaper to request some 
new pages from the operating system than to reorganize its heap and reuse 
the fragmented space on it. I think for this loop, memory allocation 
consistently swells with repeated execution, so there probably really is 
something leaking. But given that it's not in GC-tracked objects on the 
python heap, one would probably need valgrind information or a keen look at 
the code involved to locate where it's coming from.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/e63e2ec9-106a-4ddd-ab16-5c6db4fe83b4n%40googlegroups.com.

Reply via email to