Increase the default stack limit

Hi The default stack limit is (conservatively) set at 700k or so. Can we push it to ~3M by default? (this is still far below 8M or so which is the default on linux)

Pardon me if I don't know what I'm talking about: Can the stack limit not be read from ulimit/getrlimit? Or from failure to push stack? That used to work for PHP, at least in the past. It also gives users the flexibility between highly recursive computation (very high limit) and insane multithreading (low limit to conserve memory). Alternatively, pypi could stick to CPython fixed number of Python frames limit, and demand as much system stack as pypi requires to implement that. my 2c. On 17 July 2015 at 10:59, Maciej Fijalkowski <fijall@gmail.com> wrote:

On Thu, Jul 23, 2015 at 11:39 AM, Dima Tisnek <dimaqq@gmail.com> wrote:
failure is segfault
That's a terrible idea. You can create cases where CPython crashes with fat frames with the default recursion limit. On the other hand some JIT code does not consume any stack (so counting frames is unnecessary computation to start with)

Hi Fijal, On 17 July 2015 at 10:59, Maciej Fijalkowski <fijall@gmail.com> wrote:
Sadly, on Windows (I think it is XP, at least cl.exe is version 15.* and linker is version 9.*; translation of that to a MSVC version is left as an exercise for the reader) the default limit is still 1 MB. That's why the limit was set to 768KB in the first place. If you want to increase it, you'll need some #ifdefs... A bientôt, Armin.

Pardon me if I don't know what I'm talking about: Can the stack limit not be read from ulimit/getrlimit? Or from failure to push stack? That used to work for PHP, at least in the past. It also gives users the flexibility between highly recursive computation (very high limit) and insane multithreading (low limit to conserve memory). Alternatively, pypi could stick to CPython fixed number of Python frames limit, and demand as much system stack as pypi requires to implement that. my 2c. On 17 July 2015 at 10:59, Maciej Fijalkowski <fijall@gmail.com> wrote:

On Thu, Jul 23, 2015 at 11:39 AM, Dima Tisnek <dimaqq@gmail.com> wrote:
failure is segfault
That's a terrible idea. You can create cases where CPython crashes with fat frames with the default recursion limit. On the other hand some JIT code does not consume any stack (so counting frames is unnecessary computation to start with)

Hi Fijal, On 17 July 2015 at 10:59, Maciej Fijalkowski <fijall@gmail.com> wrote:
Sadly, on Windows (I think it is XP, at least cl.exe is version 15.* and linker is version 9.*; translation of that to a MSVC version is left as an exercise for the reader) the default limit is still 1 MB. That's why the limit was set to 768KB in the first place. If you want to increase it, you'll need some #ifdefs... A bientôt, Armin.
participants (4)
-
Armin Rigo
-
Dima Tisnek
-
Maciej Fijalkowski
-
Phyo Arkar