Stack allocation

Torbjörn Granlund tg at gmplib.org
Sun Jun 8 15:20:33 UTC 2014


I made the automated GMP nightbuilds use at most 512 KiB.

Now I realise that the testsuite needs might both overestimate and
underestimate the actual requirements.  The overestimate will come from
tests/mpn where we call functions outside their normal operand size
envelope.  Underestimation might happen because we don't use large
enough operands.

I tried lowering the TMP_SALLOC limit from 2^16 to 2^15 and 2^14, and
checked the resulting stack usage,

For the current limit 2^16, the use is about 512 KiB, depending a little
on the various THRESHOLDs.

For 2^15 the maximum use dropped to about 256 KiB, i.e., linear as
expected.

For 2^14 the maximum use didn't drop much at all, since here some
direct TMP_SALLOC allocations hurt.


Torbjörn
Please encrypt, key id 0xC8601622


More information about the gmp-devel mailing list