diff options
author | Andrea Corallo <akrl@sdf.org> | 2022-08-18 16:41:26 +0200 |
---|---|---|
committer | Andrea Corallo <akrl@sdf.org> | 2022-08-19 10:09:38 +0200 |
commit | 9297a9c45eba1b258b820af00ae60486fb79c43c (patch) | |
tree | 82895813c0f21cda9a38fc79e3fe532144f159ec /src | |
parent | 095ea821208b7470da98d95820653c8d527cd745 (diff) | |
download | emacs-9297a9c45eba1b258b820af00ae60486fb79c43c.tar.gz |
* src/alloc.c (pure_alloc): Warn for pure space overflow
Diffstat (limited to 'src')
-rw-r--r-- | src/alloc.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/alloc.c b/src/alloc.c index 2ffee9f729d..34bedac36ba 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -5314,6 +5314,7 @@ static void * pure_alloc (size_t size, int type) { void *result; + static bool pure_overflow_warned = false; again: if (type >= 0) @@ -5338,6 +5339,12 @@ pure_alloc (size_t size, int type) if (pure_bytes_used <= pure_size) return result; + if (!pure_overflow_warned) + { + message ("Pure Lisp storage overflowed"); + pure_overflow_warned = true; + } + /* Don't allocate a large amount here, because it might get mmap'd and then its address might not be usable. */ |