ASKSAGE: Sage Q&A Forum - Individual question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Wed, 26 Sep 2018 07:11:36 -0500Memory leaks with matrix multiplication over GF(2)http://ask.sagemath.org/question/43769/memory-leaks-with-matrix-multiplication-over-gf2/Hello everyone,
I have memory leaks when I run this program:
#### Memory leaks with sage 8.3 and sage 8.1 !!!
n = 8
X = zero_vector(GF(2), n)
M = zero_matrix(GF(2), n, n)
for _ in range(10000000):
Y = M * X
I use debian buster and sage-8.3-Debian_GNU_Linux_9-x86_64.
Is there something I'm doing wrong?
Thanks !Wed, 26 Sep 2018 04:18:13 -0500http://ask.sagemath.org/question/43769/memory-leaks-with-matrix-multiplication-over-gf2/Answer by nbruin for <p>Hello everyone,</p>
<p>I have memory leaks when I run this program:</p>
<pre><code>#### Memory leaks with sage 8.3 and sage 8.1 !!!
n = 8
X = zero_vector(GF(2), n)
M = zero_matrix(GF(2), n, n)
for _ in range(10000000):
Y = M * X
</code></pre>
<p>I use debian buster and sage-8.3-Debian_GNU_Linux_9-x86_64.</p>
<p>Is there something I'm doing wrong?</p>
<p>Thanks !</p>
http://ask.sagemath.org/question/43769/memory-leaks-with-matrix-multiplication-over-gf2/?answer=43771#post-id-43771That code shouldn't leak, but I confirm that it does. That's a bug! please file a ticket.
(the leak is not on the python heap; I checked that. It's probably a malloc/free mismatch somewhere in a C library). Also, when I change GF(2) to GF(3), no leak seems to occur. Matrices over GF(2) indeed have their own implementation.Wed, 26 Sep 2018 06:32:17 -0500http://ask.sagemath.org/question/43769/memory-leaks-with-matrix-multiplication-over-gf2/?answer=43771#post-id-43771Answer by tmonteil for <p>Hello everyone,</p>
<p>I have memory leaks when I run this program:</p>
<pre><code>#### Memory leaks with sage 8.3 and sage 8.1 !!!
n = 8
X = zero_vector(GF(2), n)
M = zero_matrix(GF(2), n, n)
for _ in range(10000000):
Y = M * X
</code></pre>
<p>I use debian buster and sage-8.3-Debian_GNU_Linux_9-x86_64.</p>
<p>Is there something I'm doing wrong?</p>
<p>Thanks !</p>
http://ask.sagemath.org/question/43769/memory-leaks-with-matrix-multiplication-over-gf2/?answer=43774#post-id-43774This is now [trac ticket 26349](https://trac.sagemath.org/ticket/26349),thanks for reporting.Wed, 26 Sep 2018 07:11:36 -0500http://ask.sagemath.org/question/43769/memory-leaks-with-matrix-multiplication-over-gf2/?answer=43774#post-id-43774