all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alex Harsanyi <alexharsanyi@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: "resource temporarily unavailable" errors on windows 7
Date: Thu, 15 Mar 2012 08:02:42 +0800	[thread overview]
Message-ID: <CAH-ciFqo0BaRHkyzAFWHnrrYXULUnUMNKLX8JueO4TDLj=YA7A@mail.gmail.com> (raw)
In-Reply-To: <83d38fvzsc.fsf@gnu.org>

2012/3/15 Eli Zaretskii <eliz@gnu.org>:
>> Date: Wed, 14 Mar 2012 13:34:42 +0800
>> From: Alex Harsanyi <alexharsanyi@gmail.com>
>> Cc: emacs-devel@gnu.org
>>
>> I also read the MSDN documentation for CreateThread and it looks like
>> the dwStackSize parameter represents the commit size unless the
>> STACK_SIZE_PARAM_IS_A_RESERVATION flag is passed to CreateThread.   I
>> tried adding this flag, but it was not recognized by mingw so I
>> replaced it with the value (0x00010000).
>>
>> When I recompiled, the resulting emacs would reserve 1Mb of stack for
>> each new thread.  I than tried a few values for the dwStackSize
>> parameter and the smallest stack reservation I could obtain was 64K,
>> Here is the call:
>>
>>    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.

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.

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

Alex.



  reply	other threads:[~2012-03-15  0:02 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 [this message]
2012-03-15  4:04                     ` Eli Zaretskii
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

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

  git send-email \
    --in-reply-to='CAH-ciFqo0BaRHkyzAFWHnrrYXULUnUMNKLX8JueO4TDLj=YA7A@mail.gmail.com' \
    --to=alexharsanyi@gmail.com \
    --cc=eliz@gnu.org \
    --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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.