[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
scratch/pure-overflow-warn a7abd8f235 1/2: * src/pdumper.c (Fdump_emacs_
From: |
Andrea Corallo |
Subject: |
scratch/pure-overflow-warn a7abd8f235 1/2: * src/pdumper.c (Fdump_emacs_portable): Check and warn for pure space overflow |
Date: |
Thu, 18 Aug 2022 15:32:13 -0400 (EDT) |
branch: scratch/pure-overflow-warn
commit a7abd8f235cf25d7a8362ac1de3b6a16d25afe33
Author: Andrea Corallo <akrl@sdf.org>
Commit: Andrea Corallo <akrl@sdf.org>
* src/pdumper.c (Fdump_emacs_portable): Check and warn for pure space
overflow
---
src/alloc.c | 5 -----
src/pdumper.c | 2 ++
2 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/src/alloc.c b/src/alloc.c
index 6e166d00d5..2ffee9f729 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -5355,9 +5355,6 @@ pure_alloc (size_t size, int type)
goto again;
}
-
-#ifdef HAVE_UNEXEC
-
/* Print a warning if PURESIZE is too small. */
void
@@ -5368,8 +5365,6 @@ check_pure_size (void)
" bytes needed)"),
pure_bytes_used + pure_bytes_used_before_overflow);
}
-#endif
-
/* Find the byte sequence {DATA[0], ..., DATA[NBYTES-1], '\0'} from
the non-Lisp data pool of the pure storage, and return its start
diff --git a/src/pdumper.c b/src/pdumper.c
index 33cb804dba..168027726c 100644
--- a/src/pdumper.c
+++ b/src/pdumper.c
@@ -4040,6 +4040,8 @@ types. */)
if (!NILP (XCDR (Fall_threads ())))
error ("No other Lisp threads can be running when this function is
called");
+ check_pure_size ();
+
/* Clear out any detritus in memory. */
do
{