unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Alex Harsanyi <alexharsanyi@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: "resource temporarily unavailable" errors on windows 7
Date: Thu, 15 Mar 2012 06:04:00 +0200	[thread overview]
Message-ID: <837gymwlvz.fsf@gnu.org> (raw)
In-Reply-To: <CAH-ciFqo0BaRHkyzAFWHnrrYXULUnUMNKLX8JueO4TDLj=YA7A@mail.gmail.com>

> Date: Thu, 15 Mar 2012 08:02:42 +0800
> From: Alex Harsanyi <alexharsanyi@gmail.com>
> Cc: emacs-devel@gnu.org
> 
> >>    cp->thrd = CreateThread (NULL, 64 * 1024, reader_thread, cp,
> >> 0x00010000, &id);
> >
> > And does this smaller stack reservation improve the situation, if you
> > return the initial memory request in allocate_heap to its original
> > value.
> >
> 
> Yes it does.  I'm using a build with allocate_heap starting at 2GB
> (the original value) and this updated CreateThread call as my working
> Emacs.   I will continue to use it and I will report if I see any more
> errors.

OK, thanks.  If you don't see any problems with this, we could think
about making this fix permanent.

> Also, the strange dwStackSize  interpretation by CreateThread was
> tested on Windows 7 32 bit only.   I'm not sure how this behaves on
> other windows versions.

Since we are in pretest, the prudent thing would be to condition this
fix on that combination only.

> Perhaps at minimum, the mingw build should be updated to use 1Mb stack
> reservation in the program header?

I don't want to do that in general, since Emacs on Windows uses
threads for features other than interaction with subprocesses, and
those other threads might need larger stack.  Also, doesn't the value
in the header determine the stack size of the main thread as well?  If
it does, then 8MB is there for a reason: Emacs devours a lot of stack
space when it does GC, because GC is an extremely recursive process.




  reply	other threads:[~2012-03-15  4:04 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-12  4:56 "resource temporarily unavailable" errors on windows 7 Alex Harsanyi
2012-03-12 17:24 ` Eli Zaretskii
2012-03-13  0:18   ` Alex Harsanyi
2012-03-13  3:54     ` Eli Zaretskii
     [not found]     ` <CAH-ciFryjk30BsozbaNx8n19aa5LaJFG_=EU1x+osoX3v=Kmsg@mail.gmail.com>
2012-03-13  3:57       ` Eli Zaretskii
2012-03-13  4:50         ` Alex Harsanyi
2012-03-13 19:34           ` Eli Zaretskii
2012-03-14  4:27             ` Alex Harsanyi
2012-03-14  5:34               ` Alex Harsanyi
2012-03-14 17:49                 ` Eli Zaretskii
2012-03-15  0:02                   ` Alex Harsanyi
2012-03-15  4:04                     ` Eli Zaretskii [this message]
2012-03-15 17:59                       ` Eli Zaretskii
2012-03-16  1:12                         ` Alex Harsanyi
2012-03-16  7:00                           ` Eli Zaretskii
2012-03-15 13:07                     ` Jason Rumney
2012-03-14 17:47               ` Eli Zaretskii
2012-03-14 23:57                 ` Alex Harsanyi

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=837gymwlvz.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=alexharsanyi@gmail.com \
    --cc=emacs-devel@gnu.org \
    /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).