|Olivier Ramare on Mon, 26 May 2008 11:27:40 +0200|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
|Re: Erreur de segmentation ???|
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. Best, Amities, Olivier