unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: drew.adams@oracle.com, emacs-devel@gnu.org
Subject: Re: stack overflow limit
Date: Wed, 04 May 2011 23:43:47 +0300	[thread overview]
Message-ID: <83oc3imc1o.fsf@gnu.org> (raw)
In-Reply-To: <jwv8vumti5e.fsf-monnier+emacs@gnu.org>

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Date: Wed, 04 May 2011 15:51:22 -0300
> Cc: emacs-devel@gnu.org
> 
> > Not a request or a suggestion.  I'm just wondering about the stack size limit
> > (e.g. for regexp search, search.c).
> > Would it make sense to make it any bigger, given that machines
> > nowadays are more powerful and have more memory, or do you consider
> > that pretty much all such stack overflows (e.g. for regexp matching)
> > are just due to poorly chosen regexps?
> 
> IIRC this depends on the OS stack size, which hasn't grown nearly as
> fast as hardware resources.

How much stack does Emacs have on a typical Unix or GNU machine these
days?

The value of re_max_failures we use now needs 4MB of stack on a 32-but
machine, twice as much on a 64-bit machine.  We also need stack space
for GC.  The result should be compared to what Emacs has and what it
can have.

`ulimit' seems to indicate we get 8MB of stack on an x86_64 GNU/Linux
system.  On Windows, we tell the linker to reserve 8MB as well (but
the Windows build is a 32-bit build.)

Ultimately, the question is: should we increase the value of
re_max_failures?



  reply	other threads:[~2011-05-04 20:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-04 17:04 stack overflow limit Drew Adams
2011-05-04 18:51 ` Stefan Monnier
2011-05-04 20:43   ` Eli Zaretskii [this message]
2011-05-05  7:16     ` Andy Wingo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83oc3imc1o.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=drew.adams@oracle.com \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).