Karim BELABAS on Thu, 23 Apr 1998 16:48:22 +0200


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

Re: Memory management



> [Michael:]
> > Coming back to my latest patch of gtrunc() -- I'm not sure about
> > the following two points.
> > 
> > (1) Should the result of a function always be in a contiguous piece
> >     of stack memory ?
> > (2) Should the result always be left on top of the stack ?
[Gerhard:]
> 
> Yes, and yes.  And for functions visible at the GP level, the stack
> had better be gerepile'd, too.

Also, one has to make sure that the root of the result (the initial cgetg)
was created before all components (so that gerepileupto can safely be applied).

Karim.
--
Karim Belabas                     e-mail: belabas@math.u-psud.fr
Universite Paris Sud              tel: (00 33) 01 69 15 57 48
Dep. de Mathematiques (bat. 425)
F-91405 Orsay