On Jan 14, 4:24 pm, "Joel B. Mohler" <[EMAIL PROTECTED]> wrote: > Micheal pointed out that a Ctrl+c signal to singular could produce some > corruption because of an ungraceful termination of singular C++ code. Now, I > guess this is obviously true and it occurs to me that it really has nothing > to do with singular. So, I tried the following: > sage: R.<x>=ZZ[] > sage: f=R([ZZ.random_element(15)*x^i for i in range(10000)]) > .... wait a long time and press Ctrl+c > > Sure enough, the memory usage in top slowly climbs and doesn't (always) drop > back after the Ctrl+c. I garbage collect: > sage: import gc > sage: gc.collect() > and the memory usage still doesn't go down. So, I guess the memory is leaked. > It could be that I'm reading top wrong ... memory columns never seem to make > sense to me. > > Some questions: Did everyone already know this?
Pretty much. :) (I've raised the issue more than once, but nobody has come up with a solution yet.) > Does anyone care that Ctrl+c > can leak memory from c/c++ libs? It's worse than just leaking memory; as far as I know, it's quite possible that hitting Ctrl-c at the exact wrong time could cause corruption that would make subsequent computations crash or return wrong answers. > Is the problem somehow worse for singular > (it's semantics for when functions delete/modify their parameter seem just a > bit nebulous to me)? Not that I know of. > -- > Joel Carl Witty --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/ -~----------~----~----~----~------~----~------~--~---
