GNU bug report logs - #18995
Error: Could not reserve dynamic heap area.

Previous Next

Package: emacs;

Reported by: Alexander Shukaev <haroogan <at> gmail.com>

Date: Sat, 8 Nov 2014 15:24:01 UTC

Severity: normal

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Alexander Shukaev <haroogan <at> gmail.com>
To: 18995 <at> debbugs.gnu.org
Subject: bug#18995: Error: Could not reserve dynamic heap area.
Date: Sat, 8 Nov 2014 16:22:56 +0100
[Message part 1 (text/plain, inline)]
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?
[Message part 2 (text/html, inline)]

This bug report was last modified 10 years and 196 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.