mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-04 11:00:45 -08:00
* emacs.c (MAX_HEAP_BSS_DIFF, my_edata): Move to where they're used,
so that we aren't warned about unused symbols.
This commit is contained in:
parent
94578f9cc2
commit
c339dc2e7e
2 changed files with 11 additions and 6 deletions
|
|
@ -1,5 +1,8 @@
|
|||
2011-04-16 Paul Eggert <eggert@cs.ucla.edu>
|
||||
|
||||
* emacs.c (MAX_HEAP_BSS_DIFF, my_edata): Move to where they're used,
|
||||
so that we aren't warned about unused symbols.
|
||||
|
||||
* xfns.c (Fx_file_dialog): Rename local to avoid shadowing.
|
||||
|
||||
* xdisp.c (x_produce_glyphs): Avoid possibly-uninitialized
|
||||
|
|
|
|||
14
src/emacs.c
14
src/emacs.c
|
|
@ -164,10 +164,6 @@ static void *my_heap_start;
|
|||
/* The gap between BSS end and heap start as far as we can tell. */
|
||||
static unsigned long heap_bss_diff;
|
||||
|
||||
/* If the gap between BSS end and heap start is larger than this
|
||||
output a warning in dump-emacs. */
|
||||
#define MAX_HEAP_BSS_DIFF (1024*1024)
|
||||
|
||||
/* Nonzero means running Emacs without interactive terminal. */
|
||||
int noninteractive;
|
||||
|
||||
|
|
@ -2100,7 +2096,6 @@ This is used in the file `loadup.el' when building Emacs.
|
|||
You must run Emacs in batch mode in order to dump it. */)
|
||||
(Lisp_Object filename, Lisp_Object symfile)
|
||||
{
|
||||
extern char my_edata[];
|
||||
Lisp_Object tem;
|
||||
Lisp_Object symbol;
|
||||
int count = SPECPDL_INDEX ();
|
||||
|
|
@ -2111,6 +2106,10 @@ You must run Emacs in batch mode in order to dump it. */)
|
|||
error ("Dumping Emacs works only in batch mode");
|
||||
|
||||
#ifdef GNU_LINUX
|
||||
|
||||
/* Warn if the gap between BSS end and heap start is larger than this. */
|
||||
# define MAX_HEAP_BSS_DIFF (1024*1024)
|
||||
|
||||
if (heap_bss_diff > MAX_HEAP_BSS_DIFF)
|
||||
{
|
||||
fprintf (stderr, "**************************************************\n");
|
||||
|
|
@ -2157,7 +2156,10 @@ You must run Emacs in batch mode in order to dump it. */)
|
|||
#ifndef WINDOWSNT
|
||||
/* On Windows, this was done before dumping, and that once suffices.
|
||||
Meanwhile, my_edata is not valid on Windows. */
|
||||
memory_warnings (my_edata, malloc_warning);
|
||||
{
|
||||
extern char my_edata[];
|
||||
memory_warnings (my_edata, malloc_warning);
|
||||
}
|
||||
#endif /* not WINDOWSNT */
|
||||
#if defined (HAVE_GTK_AND_PTHREAD) && !defined SYNC_INPUT
|
||||
/* Pthread may call malloc before main, and then we will get an endless
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue