stack limits

Erno Kuusela erno-news at erno.iki.fi
Mon Jan 1 21:45:09 EST 2001


"Michael" == Michael McCandless <mail at mikemccandless.com> writes:

| Under UNIX, besides the shell's limit or ulimit command, is there some
| hidden per-thread stack size, perhaps compiled in by gcc?

| (I'm running Python 2.0 on FreeBSD 4.2, compiled with gcc 2.95.2).

one possible explanation could be threads. it is common to
implement thread stacks so that they are spaced eg. n kB apart,
implemented by eg. mmapping /dev/zero so that actual memory
is only faulted in if you really try to use it.

spacing the thread stacks further apart works, except on some silly
obscure legacy architectures with a too small word sizes and thus
address space shortage, like x86 :)

  -- erno, reading news on a 64-bit computer and basking in
           abundant address space



More information about the Python-list mailing list