emacs-devel
[Top][All Lists]
Advanced

[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: Mon, 12 Mar 2012 19:24:35 +0200

> Date: Mon, 12 Mar 2012 12:56:13 +0800
> From: Alex Harsanyi <address@hidden>
> 
> I keep encountering the following error each time I try to start a
> subprocess under emacs:
> 
>    File error: Spawning child process, resource temporarily unavailable
> 
> This happens on Windows 7, 32 bit with the prebuilt binaries versions
> 23.4, 24.0.93 and 24.0.94 but *not* with Emacs 23.3.  It happens when
> launching all kinds of sub-processes (compilation commands, version
> control commands, diff, aspell, bash, etc).  It also happens on two
> other colleagues computers, also running Windows 7, 32 bit.  If I set
> the Windows XP compatibility flag on emacs.exe, the problem goes away,
> but makes Emacs unusable for me, since the programs I need to run do
> not work when the compatibility mode is set.
> 
> I run a diff between Emacs 23.3 and 23.4 and identified that a new
> allocate_heap() function was added in 23.4.  If I remove the function,
> falling back on the one used in 23.3 than I no longer get the above
> error.  (I attached a patch to show which function I talk about, not
> to suggest removing the function).
> 
> Should this version of allocate_heap() be used on a Windows 7, 32 bit
> platform?

I don't see why not; we need more specific information to make a
decision.

This function is responsible for reserving memory for the Emacs
process at startup.

The question is, why reserving the memory the way allocate_heap does
causes trouble for you.  What that function does is start by asking
for 2GB or reserved memory, and if that fails, asks for less and less
in steps of 8MB.  Can you step through that function with a debugger
and see how much memory it eventually allocates?

Using the version that assumes no USE_LSB_TAG gives you only 256MB,
which is too low a number.  This could be a fallback if we find no
better way, but I'd like first to understand why the current code
fails and how.



reply via email to

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