aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGlenn Morris2012-05-08 20:06:08 -0700
committerGlenn Morris2012-05-08 20:06:08 -0700
commit666b903b912ca0aa2b1a034859b752b04f03141a (patch)
treeadd3234ca1ed7c2d5b18422b3f6982b34388d65b /src
parent8f6b6da8ecdcd37ecbb83778d35baa02d68621a3 (diff)
parent0a454caf059b4cc050984a41decc2344cd9a083f (diff)
downloademacs-666b903b912ca0aa2b1a034859b752b04f03141a.tar.gz
emacs-666b903b912ca0aa2b1a034859b752b04f03141a.zip
Merge from emacs-24; up to 2012-04-21T14:12:27Z!sdl.web@gmail.com
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog8
-rw-r--r--src/w32proc.c20
2 files changed, 27 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 4bf848d953a..596133002ea 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,11 @@
12012-05-09 Eli Zaretskii <eliz@gnu.org>
2
3 * w32proc.c (new_child): Force Windows to reserve only 64KB of
4 stack for each reader_thread, instead of defaulting to 8MB
5 determined by the linker. This avoids failures in creating
6 subprocesses on Windows 7, see the discussion in this thread:
7 http://lists.gnu.org/archive/html/emacs-devel/2012-03/msg00119.html.
8
12012-05-07 Jérémy Compostella <jeremy.compostella@gmail.com> 92012-05-07 Jérémy Compostella <jeremy.compostella@gmail.com>
2 10
3 Fix up display of the *Minibuf-0* buffer in the mini window. 11 Fix up display of the *Minibuf-0* buffer in the mini window.
diff --git a/src/w32proc.c b/src/w32proc.c
index 28591f90128..5bdeba25958 100644
--- a/src/w32proc.c
+++ b/src/w32proc.c
@@ -141,7 +141,25 @@ new_child (void)
141 cp->char_consumed = CreateEvent (NULL, FALSE, FALSE, NULL); 141 cp->char_consumed = CreateEvent (NULL, FALSE, FALSE, NULL);
142 if (cp->char_consumed) 142 if (cp->char_consumed)
143 { 143 {
144 cp->thrd = CreateThread (NULL, 1024, reader_thread, cp, 0, &id); 144 /* The 0x00010000 flag is STACK_SIZE_PARAM_IS_A_RESERVATION.
145 It means that the 64K stack we are requesting in the 2nd
146 argument is how much memory should be reserved for the
147 stack. If we don't use this flag, the memory requested
148 by the 2nd argument is the amount actually _committed_,
149 but Windows reserves 8MB of memory for each thread's
150 stack. (The 8MB figure comes from the -stack
151 command-line argument we pass to the linker when building
152 Emacs, but that's because we need a large stack for
153 Emacs's main thread.) Since we request 2GB of reserved
154 memory at startup (see w32heap.c), which is close to the
155 maximum memory available for a 32-bit process on Windows,
156 the 8MB reservation for each thread causes failures in
157 starting subprocesses, because we create a thread running
158 reader_thread for each subprocess. As 8MB of stack is
159 way too much for reader_thread, forcing Windows to
160 reserve less wins the day. */
161 cp->thrd = CreateThread (NULL, 64 * 1024, reader_thread, cp,
162 0x00010000, &id);
145 if (cp->thrd) 163 if (cp->thrd)
146 return cp; 164 return cp;
147 } 165 }