Define the size of dumped data for MS-Windows locally on w32heap.c.

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).
This commit is contained in:
Eli Zaretskii 2014-06-03 10:28:07 +03:00
parent 0031c9530d
commit 89b3620292
6 changed files with 25 additions and 21 deletions

View file

@ -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).

View 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.])

View 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.

View 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) \

View 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. */

View 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;