#15367: Empty lists while creating parents
---------------------------+-------------------------
Reporter: roed | Owner:
Type: defect | Status: new
Priority: major | Milestone: sage-5.13
Component: memleak | Resolution:
Keywords: | Merged in:
Authors: | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
Dependencies: | Stopgaps:
---------------------------+-------------------------
Comment (by afiori):
The code:
{{{
memus= get_memory_usage();
for i in primes_first_n(1000):
K = Qp(i,2);
y=2-K(2);
del K; del y;
if i%100 == 1:
gc.collect();
gc.collect();
print get_memory_usage(memus);
}}}
Allocates about 64M of ram. This suggests that we are using about 64K of
ram per p-adic field. There is a similar phenomenon for quadratic fields
(about 50K each).
For normal use, no one likely cares about one allocation of 64K, however,
if you want to be using say 20000 p-adic fields (or perhaps 20000 things
with parents), you might care about your 1.2G of ram.
The side issue that it is very easy to make p-adic fields or number fields
un-garbage collectable (hopefully fixed forever someday soon
http://trac.sagemath.org/ticket/14711) makes it easy for a user to
accidentally end up running out of ram.
--
Ticket URL: <http://trac.sagemath.org/ticket/15367#comment:2>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/groups/opt_out.