From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alexander Shukaev Newsgroups: gmane.emacs.bugs Subject: bug#18995: Error: Could not reserve dynamic heap area. Date: Sat, 8 Nov 2014 16:22:56 +0100 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11c3eeee070ee805075a81fe X-Trace: ger.gmane.org 1415460256 19197 80.91.229.3 (8 Nov 2014 15:24:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 8 Nov 2014 15:24:16 +0000 (UTC) To: 18995@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Nov 08 16:24:09 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1Xn7rz-0004V0-VH for geb-bug-gnu-emacs@m.gmane.org; Sat, 08 Nov 2014 16:24:08 +0100 Original-Received: from localhost ([::1]:36102 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xn7rz-0004MF-I4 for geb-bug-gnu-emacs@m.gmane.org; Sat, 08 Nov 2014 10:24:07 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48152) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xn7rv-0004Ly-Ii for bug-gnu-emacs@gnu.org; Sat, 08 Nov 2014 10:24:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xn7ru-00075G-HK for bug-gnu-emacs@gnu.org; Sat, 08 Nov 2014 10:24:03 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:56592) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xn7ru-00075C-EJ for bug-gnu-emacs@gnu.org; Sat, 08 Nov 2014 10:24:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Xn7ru-0003B3-4Z for bug-gnu-emacs@gnu.org; Sat, 08 Nov 2014 10:24:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Alexander Shukaev Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 08 Nov 2014 15:24:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 18995 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs Original-Received: via spool by submit@debbugs.gnu.org id=B.141546019012150 (code B ref -1); Sat, 08 Nov 2014 15:24:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 8 Nov 2014 15:23:10 +0000 Original-Received: from localhost ([127.0.0.1]:53805 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xn7r3-00039t-Jf for submit@debbugs.gnu.org; Sat, 08 Nov 2014 10:23:09 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:46127) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xn7r1-00039j-6I for submit@debbugs.gnu.org; Sat, 08 Nov 2014 10:23:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xn7qw-0006p2-4E for submit@debbugs.gnu.org; Sat, 08 Nov 2014 10:23:06 -0500 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:56456) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xn7qw-0006oy-18 for submit@debbugs.gnu.org; Sat, 08 Nov 2014 10:23:02 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47840) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xn7qv-0003k2-0L for bug-gnu-emacs@gnu.org; Sat, 08 Nov 2014 10:23:01 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xn7qt-0006of-Qw for bug-gnu-emacs@gnu.org; Sat, 08 Nov 2014 10:23:00 -0500 Original-Received: from mail-lb0-x229.google.com ([2a00:1450:4010:c04::229]:46334) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xn7qt-0006n2-7p for bug-gnu-emacs@gnu.org; Sat, 08 Nov 2014 10:22:59 -0500 Original-Received: by mail-lb0-f169.google.com with SMTP id 10so4055598lbg.0 for ; Sat, 08 Nov 2014 07:22:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=0tKxQHqr6EgPjERO7sYxf/d/JI8xt4bS6i4479SRtfE=; b=F6Dn56nLGwSsISU5Q8mkFJnMKxydwzR/dFJ20rCz8wCVUxLNHDz8ZNVYX8DfNXzkKv i7pCTBD1/ATr9HFG2ulUINBclKtV+OeD57IiK0PNilRmqCPnOxBv1gZnCmAXuGRe9Zhk 7cSO7yxgdGCVt/jYhFG0MrIQrNZHClnhsWxxI8vor9308XwCdeJSIIUhLibSJiBLVs0D 1bb53KLiQTqWvJgMThCwx22GY/i7Id2mqL6UK+F62Iu4tnhs+IP8szfDybUfHjt9/DVf bxhl3KtH6/U4Pb51sUauNOKRcOg7uqh2kGX8ecZaO0lVLzJZGYyQrto6p7wP+pHRkEHi Lmiw== X-Received: by 10.112.54.162 with SMTP id k2mr17838668lbp.63.1415460176725; Sat, 08 Nov 2014 07:22:56 -0800 (PST) Original-Received: by 10.112.202.106 with HTTP; Sat, 8 Nov 2014 07:22:56 -0800 (PST) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:95717 --001a11c3eeee070ee805075a81fe Content-Type: text/plain; charset=UTF-8 The build enviroment is MinGW-w64 and MSYS2. When I build `emacs-24', Emacs is being configured with Should Emacs use the GNU version of malloc? yes Should Emacs use a relocating allocator for buffers? yes Should Emacs use mmap(2) for buffer allocation? no With this configuration the x64 version is built just fine, but the x86 version build fails with make[2]: Entering directory > '/c/Users/Haroogan/Projects/GitHub/MINGW-packages/mingw-w64-emacs/src/.build/i686-w64-mingw32/lisp' > Compiling > /C/Users/Haroogan/Projects/GitHub/MINGW-packages/mingw-w64-emacs/src/emacs/lisp/emacs-lisp/macroexp.el > Error: Could not reserve dynamic heap area. I've checked what is called in this case and it seems to be fine at the first glance: #else /* USE_LSB_TAG */ static char * allocate_heap (void) { #ifdef _WIN64 size_t size = 0x4000000000ull; /* start by asking for 32GB */ #else /* We used to start with 2GB here, but on Windows 7 that would leave too little room in the address space for threads started by Windows on our behalf, e.g. when we pop up the file selection dialog. */ size_t size = 0x68000000; /* start by asking for 1.7GB */ <<< This one is used. #endif 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_LSB_TAG */ Any ideas? --001a11c3eeee070ee805075a81fe Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
The build enviroment is MinGW-w64 and MSYS2.

When I build `emacs-24', Emacs is being configured wit= h

Should Emacs use the GNU version of malloc? yes
Should Emacs use a relocating allocat= or for buffers? yes
Should Emacs use mmap(2) for buffer allocation? <= /span> no

With this configuration the x64 version = is built just fine, but the x86 version build fails with

make[2]: Entering directory '/c/Users/Haroogan/= Projects/GitHub/MINGW-packages/mingw-w64-emacs/src/.build/i686-w64-mingw32/= lisp'
Compiling /C/Users/Haroogan/Projects/GitHub/MINGW-packages/min= gw-w64-emacs/src/emacs/lisp/emacs-lisp/macroexp.el
Error: Could not rese= rve dynamic heap area.

=C2=A0I've check= ed what is called in this case and it seems to be fine at the first glance:=

#else =C2=A0/* USE_LSB_TAG */
static char *
allocate_heap (void)
<= div>{
#ifdef _WIN64
=C2=A0 size_t= size =3D 0x4000000000ull; /* start by asking for 32GB */
<= div>#else
=C2=A0 /* We used to start with 2GB here, bu= t on Windows 7 that would leave
=C2=A0 =C2=A0 =C2=A0to= o little room in the address space for threads started by
<= div>=C2=A0 =C2=A0 =C2=A0Windows on our behalf, e.g. when we pop up the file= selection
=C2=A0 =C2=A0 =C2=A0dialog. =C2=A0*/
<= /div>
=C2=A0 size_t size =3D 0x68000000; /* start by asking for 1.= 7GB */ <<< This one is used.
#endif
=C2=A0 void *ptr =3D NULL;

=C2=A0 while (!ptr && size > 0x00100000)
<= div>
=C2=A0 =C2=A0 {
=C2=A0 =C2=A0 =C2=A0 reserved= _heap_size =3D size;
=C2=A0 =C2=A0 =C2=A0 ptr =3D Virt= ualAlloc (NULL,
=C2=A0get_reserved_heap_size (),
=C2=A0MEM_RESERVE,
=C2=A0P= AGE_NOACCESS);
=C2=A0 =C2=A0 =C2=A0 size -=3D 0x008000= 00; /* if failed, decrease request by 8MB */
=C2=A0 = =C2=A0 }

=C2=A0 return ptr;<= /div>
}
#endif /* USE_LSB_TAG */
<= /div>

Any ideas?
--001a11c3eeee070ee805075a81fe--