mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-06 03:40:56 -08:00
Responding to review by nb <https://info.ravenbrook.com/mail/2016/03/22/17-19-03/0/>.
Copied from Perforce Change: 190349 ServerID: perforce.ravenbrook.com
This commit is contained in:
parent
d161c0e4ee
commit
33b28efbdb
3 changed files with 30 additions and 4 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue