on subsequent starts. */
int initialized;
+#ifdef DARWIN_OS
+extern void unexec_init_emacs_zone (void);
+#endif
+
#ifdef DOUG_LEA_MALLOC
/* Preserves a pointer to the memory allocated that copies that
static data inside glibc's malloc. */
/* The address where the heap starts (from the first sbrk (0) call). */
static void *my_heap_start;
+#ifdef GNU_LINUX
/* The gap between BSS end and heap start as far as we can tell. */
-static unsigned long heap_bss_diff;
+static uprintmax_t heap_bss_diff;
+#endif
/* Nonzero means running Emacs without interactive terminal. */
int noninteractive;
/* Handler for SIGDANGER. */
void
-memory_warning_signal (sig)
- int sig;
+memory_warning_signal (int sig)
{
signal (sig, memory_warning_signal);
SIGNAL_THREAD_CHECK (sig);
setenv ("G_SLICE", "always-malloc", 1);
#endif
+#ifdef GNU_LINUX
if (!initialized)
{
extern char my_endbss[];
heap_bss_diff = (char *)my_heap_start - max (my_endbss, my_endbss_static);
}
+#endif
#ifdef RUN_TIME_REMAP
if (initialized)
{
fprintf (stderr, "**************************************************\n");
fprintf (stderr, "Warning: Your system has a gap between BSS and the\n");
- fprintf (stderr, "heap (%lu bytes). This usually means that exec-shield\n",
+ fprintf (stderr, "heap (%"pMu" bytes). This usually means that exec-shield\n",
heap_bss_diff);
fprintf (stderr, "or something similar is in effect. The dump may\n");
fprintf (stderr, "fail because of this. See the section about\n");
void
syms_of_emacs (void)
{
- Qfile_name_handler_alist = intern_c_string ("file-name-handler-alist");
- staticpro (&Qfile_name_handler_alist);
- Qrisky_local_variable = intern_c_string ("risky-local-variable");
- staticpro (&Qrisky_local_variable);
+ DEFSYM (Qfile_name_handler_alist, "file-name-handler-alist");
+ DEFSYM (Qrisky_local_variable, "risky-local-variable");
#ifndef CANNOT_DUMP
defsubr (&Sdump_emacs);