|Bill Allombert on Mon, 26 May 2008 22:19:25 +0200|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
|Re: Erreur de segmentation ???|
On Mon, May 26, 2008 at 11:35:34AM +0200, Olivier Ramare wrote: > Bill Allombert a écrit : > >Now of course, the question is whether this is a memory leak in GP, > >or you are allocating too much memory. > > > > Ok, I found it :-) > This script is not supposed to allocate any (sizeable) memory chunk. > The main part Walk does not. > It calls DiscreteValue, which has local variables and this is the > source of all the stack. The main variable is > > mybiggamma = vector(bigD) (well, bigD is 2 here) > > and making this variable global saves a lot (but not all: the > stack still increases somewhat but at a much lower rate). > > If I'm not mistaken, this *is* a memory leak. I reran your script with PARI 2.4.3SVN (the development version) and the memory usage was constant (about 6Mb). So this really start looking like a memory leak in the stable version. Cheers, Bill.