Increase the default stack limit
![](https://secure.gravatar.com/avatar/bfc96d2a02d9113edb992eb96c205c5a.jpg?s=120&d=mm&r=g)
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)
![](https://secure.gravatar.com/avatar/ac6db094bcfad225fa22561ecc68b072.jpg?s=120&d=mm&r=g)
I am sure it is fine for most modern linux distros . On Sun, Jul 19, 2015 at 11:08 AM, Maciej Fijalkowski <fijall@gmail.com> wrote:
should improve the default limit by +-4x
On Sat, Jul 18, 2015 at 11:20 PM, Phyo Arkar <phyo.arkarlwin@gmail.com> wrote:
On Fri, Jul 17, 2015 at 3:29 PM, Maciej Fijalkowski <fijall@gmail.com> wrote:
stack limit
That will help alot with recursions?
![](https://secure.gravatar.com/avatar/fbeee3d76a35f9de8847f36ee51c28a2.jpg?s=120&d=mm&r=g)
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:
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) _______________________________________________ pypy-dev mailing list pypy-dev@python.org https://mail.python.org/mailman/listinfo/pypy-dev
![](https://secure.gravatar.com/avatar/bfc96d2a02d9113edb992eb96c205c5a.jpg?s=120&d=mm&r=g)
On Thu, Jul 23, 2015 at 11:39 AM, Dima Tisnek <dimaqq@gmail.com> wrote:
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?
failure is segfault
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.
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)
![](https://secure.gravatar.com/avatar/fbeee3d76a35f9de8847f36ee51c28a2.jpg?s=120&d=mm&r=g)
Can the stack limit not be read from ulimit/getrlimit? Or from failure to push stack?
failure is segfault
good point, I doubt stack probe is worth the overhead (settings/resetting signals and/or segv handler that allows probe only) how about stack limit based on getrlimit though?
![](https://secure.gravatar.com/avatar/5b37e6b4ac97453e4ba9dba37954cf79.jpg?s=120&d=mm&r=g)
Hi Fijal, On 17 July 2015 at 10:59, Maciej Fijalkowski <fijall@gmail.com> wrote:
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)
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