]> git.eshelyaron.com Git - emacs.git/commitdiff
Define the size of dumped data for MS-Windows locally on w32heap.c.
authorEli Zaretskii <eliz@gnu.org>
Tue, 3 Jun 2014 07:28:07 +0000 (10:28 +0300)
committerEli Zaretskii <eliz@gnu.org>
Tue, 3 Jun 2014 07:28:07 +0000 (10:28 +0300)
 configure.ac (C_HEAP_SWITCH): Remove.

 src/w32heap.c (DUMPED_HEAP_SIZE): Move from w32heap.h.  Don't use
 HEAPSIZE; instead, define separate values for the 32- and 64-bit
 builds.
 src/Makefile.in (C_HEAP_SWITCH): Remove.
 (ALL_CFLAGS): Don't use $(C_HEAP_SWITCH).

ChangeLog
configure.ac
src/ChangeLog
src/Makefile.in
src/w32heap.c
src/w32heap.h

index e437bd7b35d0a9fb9daab018eed0064eb255ee21..a3d9e0e47212b019d6916f5b3371fe67dfba5172 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2014-06-03  Eli Zaretskii  <eliz@gnu.org>
+
+       * configure.ac (C_HEAP_SWITCH): Remove.
+
 2014-06-02  Paul Eggert  <eggert@cs.ucla.edu>
 
        Fix port to 32-bit AIX with xlc (Bug#17598).
index 48eda74a06157f40b91111f84cb8bb7202a02dab..967d2c447057690f0a7060a2a822df8cc36f372f 100644 (file)
@@ -4835,18 +4835,6 @@ LD_SWITCH_SYSTEM_TEMACS="$LDFLAGS_NOCOMBRELOC $LD_SWITCH_SYSTEM_TEMACS"
 
 AC_SUBST(LD_SWITCH_SYSTEM_TEMACS)
 
-## MinGW-specific compilation switch.
-C_HEAP_SWITCH=
-if test "${opsys}" = "mingw32"; then
-  ## Preload heap size of temacs.exe in MB.
-  case "$canonical" in
-    x86_64-*-*) C_HEAP_SWITCH="-DHEAPSIZE=18" ;;
-    *) C_HEAP_SWITCH="-DHEAPSIZE=12" ;;
-  esac
-fi
-
-AC_SUBST(C_HEAP_SWITCH)
-
 ## Common for all window systems
 if test "$window_system" != "none"; then
   AC_DEFINE(HAVE_WINDOW_SYSTEM, 1, [Define if you have a window system.])
index 0a31818070fe4f58be81ecafe36de53795e5f592..f0ea2885b8ce0eb6fa3f60ff7c5d6c22d1f8b67f 100644 (file)
@@ -1,5 +1,12 @@
 2014-06-03  Eli Zaretskii  <eliz@gnu.org>
 
+       * w32heap.c (DUMPED_HEAP_SIZE): Move from w32heap.h.  Don't use
+       HEAPSIZE; instead, define separate values for the 32- and 64-bit
+       builds.
+
+       * Makefile.in (C_HEAP_SWITCH): Remove.
+       (ALL_CFLAGS): Don't use $(C_HEAP_SWITCH).
+
        Fix MS-Windows build broken by menu changes on 2014-06-02.
        * w32menu.c (w32_menu_show): Fix a typo that broke compilation.
 
index 697ff3a29f05e1b77c532e8aa544c05687e632ed..bda4623d7de8ae6188801640b0bcfd7bb61f737a 100644 (file)
@@ -86,9 +86,6 @@ PNG_CFLAGS=@PNG_CFLAGS@
 ## something similar.  This is normally set by configure.
 C_SWITCH_X_SITE=@C_SWITCH_X_SITE@
 
-## Set Emacs dumped heap size for Windows NT
-C_HEAP_SWITCH=@C_HEAP_SWITCH@
-
 ## Define LD_SWITCH_X_SITE to contain any special flags your loader
 ## may need to deal with X Windows.  For instance, if your X libraries
 ## aren't in a place that your loader can find on its own, you might
@@ -322,7 +319,7 @@ MKDEPDIR=@MKDEPDIR@
 ##
 ## FIXME? MYCPPFLAGS only referenced in etc/DEBUG.
 ALL_CFLAGS=-Demacs $(MYCPPFLAGS) -I. -I$(srcdir) \
-  -I$(lib) -I$(srcdir)/../lib $(C_HEAP_SWITCH) \
+  -I$(lib) -I$(srcdir)/../lib \
   $(C_SWITCH_MACHINE) $(C_SWITCH_SYSTEM) $(C_SWITCH_X_SITE) \
   $(GNUSTEP_CFLAGS) $(CFLAGS_SOUND) $(RSVG_CFLAGS) $(IMAGEMAGICK_CFLAGS) \
   $(PNG_CFLAGS) $(LIBXML2_CFLAGS) $(DBUS_CFLAGS) \
index bba236cc8d14601ff69252c658d7d76db95ed925..f08e1078b0afad0f6391424d4863b332917eed23 100644 (file)
@@ -108,7 +108,19 @@ typedef struct _RTL_HEAP_PARAMETERS {
    be freed anyway), and we use a new private heap for all new
    allocations.  */
 
-unsigned char dumped_data[DUMPED_HEAP_SIZE];
+/* FIXME: Most of the space reserved for dumped_data[] is only used by
+   the 1st bootstrap-emacs.exe built while bootstrapping.  Once the
+   preloaded Lisp files are byte-compiled, the next loadup uses less
+   than half of the size stated below.  It would be nice to find a way
+   to build only the first bootstrap-emacs.exe with the large size,
+   and reset that to a lower value afterwards.  */
+#ifdef _WIN64
+# define DUMPED_HEAP_SIZE (18*1024*1024)
+#else
+# define DUMPED_HEAP_SIZE (12*1024*1024)
+#endif
+
+static unsigned char dumped_data[DUMPED_HEAP_SIZE];
 
 /* Info for managing our preload heap, which is essentially a fixed size
    data area in the executable. */
index 18b6c85c2dec21e0e6ed4f6d744ea10c5c5b3b0f..787fe9ade5f1324cb41262b6cc0dab5ba63e6fd8 100644 (file)
@@ -28,10 +28,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
  * Heap related stuff.
  */
 
-#define DUMPED_HEAP_SIZE (HEAPSIZE*1024*1024)
-
-extern unsigned char dumped_data[];
-
 extern unsigned char *get_data_start (void);
 extern unsigned char *get_data_end (void);
 extern size_t         reserved_heap_size;