unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Alex Harsanyi <alexharsanyi@gmail.com>
To: emacs-devel@gnu.org
Subject: "resource temporarily unavailable" errors on windows 7
Date: Mon, 12 Mar 2012 12:56:13 +0800	[thread overview]
Message-ID: <CAH-ciFoNr0U7FfJ488MCLSS+zCc6WFF1YrZsQaXXfbL0V8docw@mail.gmail.com> (raw)

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?

Alex.



diff -up --tabsize=4 c\:/emacs-24.0.94/src/w32heap.c\~
c\:/emacs-24.0.94/src/w32heap.c
--- c:/emacs-24.0.94/src/w32heap.c~	2012-02-14 00:13:25.000000000 +0800
+++ c:/emacs-24.0.94/src/w32heap.c	2012-03-02 10:38:51.591246600 +0800
@@ -114,7 +114,6 @@ get_data_end (void)
   return data_region_end;
 }

-#if !defined (USE_LISP_UNION_TYPE) && !defined (USE_LSB_TAG)
 static char *
 allocate_heap (void)
 {
@@ -141,27 +140,6 @@ allocate_heap (void)

   return ptr;
 }
-#else  /* USE_LISP_UNION_TYPE || USE_LSB_TAG */
-static char *
-allocate_heap (void)
-{
-  unsigned long size = 0x80000000; /* start by asking for 2GB */
-  void *ptr = NULL;
-
-  while (!ptr && size > 0x00100000)
-    {
-      reserved_heap_size = size;
-      ptr = VirtualAlloc (NULL,
-			  get_reserved_heap_size (),
-			  MEM_RESERVE,
-			  PAGE_NOACCESS);
-      size -= 0x00800000; /* if failed, decrease request by 8MB */
-    }
-
-  return ptr;
-}
-#endif /* USE_LISP_UNION_TYPE || USE_LSB_TAG */
-

 /* Emulate Unix sbrk.  Note that ralloc.c expects the return value to
    be the address of the _start_ (not end) of the new block in case of

Diff finished.  Mon Mar 12 07:47:19 2012



             reply	other threads:[~2012-03-12  4:56 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-12  4:56 Alex Harsanyi [this message]
2012-03-12 17:24 ` "resource temporarily unavailable" errors on windows 7 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
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=CAH-ciFoNr0U7FfJ488MCLSS+zCc6WFF1YrZsQaXXfbL0V8docw@mail.gmail.com \
    --to=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).