]> git.eshelyaron.com Git - emacs.git/commit
Clean up memory allocation and unexec support on MS-Windows
authorEli Zaretskii <eliz@gnu.org>
Fri, 18 Jan 2019 15:04:00 +0000 (17:04 +0200)
committerEli Zaretskii <eliz@gnu.org>
Fri, 18 Jan 2019 15:04:00 +0000 (17:04 +0200)
commit5e3b0f5239027a413775d375f04376a3c97d0bf9
tree7d6e6dbe03a405a2bd7e527e39a12fbf0dd1aa64
parentf943409183559b0af0e89f52bf0a93f8431c2dcf
Clean up memory allocation and unexec support on MS-Windows

* src/w32heap.c (report_temacs_memory_usage): Condition on
!CANNOT_DUMP, in addition to ENABLE_CHECKING.
(init_heap): Accept an argument, which tells us what heap
allocation method to use.
(DUMPED_HEAP_SIZE) [CANNOT_DUMP]: Define to a small value, as
we don't use dumped_data[] in this case.
* src/w32heap.h (init_heap): Adjust prototype.
<using_dynamic_heap>: Remove declaration.
* src/emacs.c (main) [WINDOWSNT]: Determine heap allocation
method based on whether we are in temacs and whether unexec
will be used to dump Emacs.  Pass the heap allocation method
to init_heap, which is now called after parsing the
--temacs=METHOD option.
* src/unexw32.c (unexec): Don't fiddle with using_dynamic_heap.
<using_dynamic_heap>: Remove definition.
* src/w32proc.c (malloc_before_init, realloc_before_init)
(free_before_init): New functions, to catch memory allocation
before heap allocation method is set up.
src/emacs.c
src/unexw32.c
src/w32heap.c
src/w32heap.h
src/w32proc.c