[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "resource temporarily unavailable" errors on windows 7

From: Eli Zaretskii
Subject: Re: "resource temporarily unavailable" errors on windows 7
Date: Thu, 15 Mar 2012 06:04:00 +0200

> Date: Thu, 15 Mar 2012 08:02:42 +0800
> From: Alex Harsanyi <address@hidden>
> Cc: address@hidden
> >>    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 via email to

[Prev in Thread] Current Thread [Next in Thread]