On 2018-03-13, Dima Pasechnik <dimp...@gmail.com> wrote:
> On Tuesday, March 13, 2018 at 8:37:49 AM UTC, Jeroen Demeyer wrote:
>> I can imagine a small function constructing a matrix (for which it needs
>> to construct the MatrixSpace) to do some computation but not keeping
>> that matrix in memory. For example, the output of that function could be
>> the determinant of the matrix. If this function is called from a loop,
>> you end up in the scenario that I described.
> this example, assuming the matrix size is a parameter, would easily become
> a memory leak,
> just imagine calling this function millions of times, for 10 different
> fields, with random matrix sizes.
No, the idea is to only keep the 64 (or so) latest items in memory
(Jeroen's approach) resp. to keep stuff in memory till the next cyclic
garbage collection occurs (my approach). So, if you run this function
millions of times then there will be at most 64 matrix spaces in memory.
You received this message because you are subscribed to the Google Groups
To unsubscribe from this group and stop receiving emails from it, send an email
To post to this group, send email to email@example.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.