Ask Your Question
2

Memory leaks with matrix multiplication over GF(2)

asked 2018-09-26 11:18:13 +0100

agrospel gravatar image

updated 2024-04-14 16:00:31 +0100

FrédéricC 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 13:32:17 +0100

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
1

answered 2018-09-26 14:11:36 +0100

tmonteil gravatar image

This is now trac ticket 26349,thanks for reporting.

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 11:18:13 +0100

Seen: 464 times

Last updated: Sep 26 '18