Justin Walker on Tue, 18 Mar 2003 18:53:52 -0800


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: Another memory leak in Pari/GP 2.2.5



On Tuesday, Mar 18, 2003, at 10:41 US/Pacific, Alexander Shumakovitch wrote:

Hi all!

I guess I've found a memory leak in Pari 2.2.5 (on Linux 2.4.20). Here
is how to reproduce it:
  (19:36) gp > x = vector(2); y = vectorv(2);
  time = 0 ms.
  (19:36) gp > m = matrix(2,2); m[2, ] = x; m[, 2] = y; getheap
  time = 0 ms.
  %2 = [7, 77]
[snip]
The histsize is set to 1, so history is not an issue. What is
interesting is that if one switches the assignments or skips one of
them, everything goes back to normal:
[snip]

I don't see quite the same behavior:
? m = matrix(2,2); m[, 2] = y; m[2, ] = x; getheap
time = 0 ms.
%18 = [107, 655]
? getheap \\ A number of 'getheap's in a row, no other commands...
time = 0 ms.
%25 = [114, 746]
? getheap
time = 0 ms.
%26 = [115, 759]
                      \\ This does not let things go back to normal...
? m = matrix(2,2); m[, 2] = y; m[2, ] = x; getheap
time = 0 ms.
%27 = [116, 772]
? m = matrix(2,2); m[, 2] = y; m[2, ] = x; getheap
time = 0 ms.
%28 = [117, 785]
? m = matrix(2,2); m[, 2] = y; m[2, ] = x;
time = 0 ms.
? m = matrix(2,2); m[, 2] = y; m[2, ] = x;
time = 0 ms.
? m = matrix(2,2); m[, 2] = y; m[2, ] = x;
time = 0 ms.
? getheap
time = 0 ms.
%32 = [121, 831]

This is the version info (this is up to date with CVS as of 3/11):

          GP/PARI CALCULATOR Version 2.2.6 (development CHANGES-1.704)
                  powerpc (PPC/GMP-4.1 kernel) 32-bit version
               compiled: 03/11/03, gcc-3.1 20020420 (prerelease)
                (readline v4.1 enabled, extended help available)

                       Copyright (C) 2003 The PARI Group

PARI/GP is free software, covered by the GNU General Public License, and
comes WITHOUT ANY WARRANTY WHATSOEVER.

Type ? for help, \q to quit.
Type ?12 for how to get moral (and possibly technical) support.

   realprecision = 28 significant digits
   seriesprecision = 16 significant terms
   format = g0.28

parisize = 4000000, primelimit = 500000

Regards,

Justin

--
Justin C. Walker, Curmudgeon-At-Large  *
Institute for General Semantics | It's not whether you win or lose...
                                       |  It's whether *I* win or lose.
*--------------------------------------*-------------------------------*