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: Alex Harsanyi
Subject: Re: "resource temporarily unavailable" errors on windows 7
Date: Tue, 13 Mar 2012 12:50:09 +0800

2012/3/13 Eli Zaretskii <address@hidden>:
> [Please keep the list on the CC.]
>
>> Date: Tue, 13 Mar 2012 09:31:18 +0800
>> From: Alex Harsanyi <address@hidden>
>>
>> Just a quick update: I modified allocate_heap() to start asking for
>> 1.5GB initially and that also seemed to fix the subprocess creation
>> problem.
>
> What value exactly did you use?

  unsigned long size = 0x60000000; /* start by asking for 1.5GB */

>
> Also, how much virtual memory do you have on that machine?

The machine has 6GB of physical memory, 3GB usable (800Mb free), total
virtual memory is 6Gb (3GB free).  I don't think I'm running out of
memory.

> Is it
> possible that enlarging the amount of virtual memory lets Emacs run OK
> even with the original 1.8GB allocation size?

Since I have more memory available than Emacs requests, I don't think
enlarging the amount of virtual memory would help.  Starting a new
Emacs session does not seem to affect the amount of free memory
available significantly: my Emacs session uses 25Mb of physical memory
after start-up.  My main Emacs session (where I do my work) currently
uses 63Mb, not a very large value.  The 1.5GB "reservation" by
allocate_heap() does not decrease the amount of available virtual
memory.

>
> Finally, what happens if you start an Emacs session (with the 1.5GB
> allocation that you say work for you), and then start another Emacs
> session without exiting the first one?  Does the second session start
> successfully and is able to start subprocesses normally?

Yes, I can start a second Emacs session and subprocess creation works
fine.  In fact, I started 5 simultaneous sessions and tested that for
good measure :-)


Perhaps I was a bit imprecise with the terminology, but I did realise
that allocate_heap() only reserves the memory and that the 2GB address
space limit is per process, not per system.

There seems to be some documentation on the net that ANSI
CreateProcess will allocate memory to convert the command line to
UNICODE before calling the UNICODE version of CreateProcess, this is
what I meant by "CreateProcess fails to allocate memory". Could this
memory  allocation fail if all the memory is already reserved for
something
else?

Alex.



reply via email to

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