Ask Your Question
2

Memory leaks with matrix multiplication over GF(2)

asked 2018-09-26 04:18:13 -0600

agrospel gravatar image

updated 2018-09-26 07:09:21 -0600

tmonteil gravatar image

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 !

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
1

answered 2018-09-26 07:11:36 -0600

tmonteil gravatar image

This is now trac ticket 26349,thanks for reporting.

edit flag offensive delete link more
1

answered 2018-09-26 06:32:17 -0600

nbruin gravatar image

That 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.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2018-09-26 04:18:13 -0600

Seen: 64 times

Last updated: Sep 26 '18