projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
095ea82
)
* src/alloc.c (pure_alloc): Warn for pure space overflow
author
Andrea Corallo
<akrl@sdf.org>
Thu, 18 Aug 2022 14:41:26 +0000
(16:41 +0200)
committer
Andrea Corallo
<akrl@sdf.org>
Fri, 19 Aug 2022 08:09:38 +0000
(10:09 +0200)
src/alloc.c
patch
|
blob
|
history
diff --git
a/src/alloc.c
b/src/alloc.c
index 2ffee9f729d2079a9413f4b8a36af2bd3a0b9e80..34bedac36ba18e0d857f1d59206ef0fdd19ca24c 100644
(file)
--- 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. */