mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-16 17:24:23 +00:00
* src/alloc.c (pure_alloc): Warn for pure space overflow
This commit is contained in:
parent
a7abd8f235
commit
def6d57669
1 changed files with 7 additions and 0 deletions
|
|
@ -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. */
|
||||
|
|
|
|||
Loading…
Reference in a new issue