Bill Allombert on Thu, 19 Jan 2017 12:54:48 +0100


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

Re: Use PROT_NONE for unused virtual stack memory


On Thu, Jan 05, 2017 at 10:47:51AM +0100, Jeroen Demeyer wrote:
> Hello pari-dev,
> 
> In attachment you find an updated version of my patch, taking in account
> some comments by Bill Allombert and fixing #1881.

This leads to a change of behaviour. Is it intended ?

Try
default(parisizemax,"4G");
E=ellinit([2,a-5],nfinit(a^2-5));
lfun(E,1)

Before:
? default(parisizemax,"4G");
  ***   Warning: new maximum stack size = 4000002048 (3814.699 Mbytes).
? E=ellinit([2,a-5],nfinit(a^2-5));
? lfun(E,1)
  *** lfun: Warning: increasing stack size to 16000000.
  *** lfun: Warning: increasing stack size to 32000000.
  *** lfun: Warning: increasing stack size to 64000000.
  *** lfun: Warning: increasing stack size to 128000000.

and now

? default(parisizemax,"4G");
  ***   Warning: new maximum stack size = 4000002048 (3814.699 Mbytes).
? E=ellinit([2,a-5],nfinit(a^2-5));
? lfun(E,1)
  *** lfun: Warning: increasing stack size to 36176936.
  *** lfun: Warning: increasing stack size to 72353872.
  *** lfun: Warning: increasing stack size to 144707744

Cheers,
Bill.