1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-06 03:40:56 -08:00
Copied from Perforce
 Change: 190349
 ServerID: perforce.ravenbrook.com
This commit is contained in:
Richard Brooksby 2016-03-23 17:31:59 +00:00
parent d161c0e4ee
commit 33b28efbdb
3 changed files with 30 additions and 4 deletions

View file

@ -466,9 +466,7 @@ static void shieldQueue(Arena arena, Seg seg)
return;
}
/* Allocate shield queue if necessary. */
/* TODO: This will try to extend the queue on every attempt, even
if it failed last time. That might be slow. */
/* Allocate or extend the shield queue if necessary. */
if (shield->next >= shield->length) {
void *p;
Res res;
@ -509,6 +507,8 @@ static void shieldQueue(Arena arena, Seg seg)
AVER_CRITICAL(shield->limit <= shield->length);
AVER_CRITICAL(shield->next <= shield->limit);
/* If we failed to extend the shield queue array, degrade to an LRU
circular buffer. */
if (shield->next >= shield->length)
shield->next = 0;
AVER_CRITICAL(shield->next < shield->length);