From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: "resource temporarily unavailable" errors on windows 7 Date: Tue, 13 Mar 2012 05:54:22 +0200 Message-ID: <83wr6pw3yp.fsf@gnu.org> References: <83aa3lybos.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: dough.gmane.org 1331610861 20375 80.91.229.3 (13 Mar 2012 03:54:21 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 13 Mar 2012 03:54:21 +0000 (UTC) Cc: emacs-devel@gnu.org To: Alex Harsanyi Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Mar 13 04:54:20 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1S7IoW-00080e-C3 for ged-emacs-devel@m.gmane.org; Tue, 13 Mar 2012 04:54:20 +0100 Original-Received: from localhost ([::1]:54362 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S7IoV-00077U-RP for ged-emacs-devel@m.gmane.org; Mon, 12 Mar 2012 23:54:19 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:44397) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S7IoS-00077C-Uh for emacs-devel@gnu.org; Mon, 12 Mar 2012 23:54:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S7IoR-0005ih-4y for emacs-devel@gnu.org; Mon, 12 Mar 2012 23:54:16 -0400 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:43912) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S7IoQ-0005hT-Sk for emacs-devel@gnu.org; Mon, 12 Mar 2012 23:54:15 -0400 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0M0T004001GKEZ00@a-mtaout22.012.net.il> for emacs-devel@gnu.org; Tue, 13 Mar 2012 05:54:12 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([77.124.179.236]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0M0T003QY1IBU7K0@a-mtaout22.012.net.il>; Tue, 13 Mar 2012 05:54:12 +0200 (IST) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-Received-From: 80.179.55.172 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:148993 Archived-At: > Date: Tue, 13 Mar 2012 08:18:10 +0800 > From: Alex Harsanyi > Cc: emacs-devel@gnu.org > > My understanding is that in a 32bit windows process, only 2Gb of > address space is usable by the application. That's true. > Could this mean that after alocate_heap() is called, the entire > address space of the emacs process is allocated and CreateProcess() > cannot allocate memory for its internal needs? The function we are talking about does not _allocate_ memory, it just _reserves_ it. Memory is only allocated (i.e. committed) when Emacs actually needs it (and decommitted when it's no longer needed). > Since only 1.4 Gb are allocated in Windows XP compatibility mode, this > would leave 0.4 Gb free to be used by CreateProcess(), so subprocesses > can be started without problems. How much memory is "left" after allocate_heap does its job depends on how much _virtual_ memory do you have. IOW, the 2GB number is _per_application_, not for _all_ applications. See my other mail for more practical questions.