unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Alex Harsanyi <alexharsanyi@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: "resource temporarily unavailable" errors on windows 7
Date: Tue, 13 Mar 2012 12:50:09 +0800	[thread overview]
Message-ID: <CAH-ciFq+srBc2=g3kmy9gfJGPcBfS=VajPnjcMB4pn1G-cwqNg@mail.gmail.com> (raw)
In-Reply-To: <83vcm9w3th.fsf@gnu.org>

2012/3/13 Eli Zaretskii <eliz@gnu.org>:
> [Please keep the list on the CC.]
>
>> Date: Tue, 13 Mar 2012 09:31:18 +0800
>> From: Alex Harsanyi <alexharsanyi@gmail.com>
>>
>> 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	other threads:[~2012-03-13  4:50 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-12  4:56 "resource temporarily unavailable" errors on windows 7 Alex Harsanyi
2012-03-12 17:24 ` 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 [this message]
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-ciFq+srBc2=g3kmy9gfJGPcBfS=VajPnjcMB4pn1G-cwqNg@mail.gmail.com' \
    --to=alexharsanyi@gmail.com \
    --cc=eliz@gnu.org \
    --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).