1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-04-13 17:51:29 -07:00

Fix chunkalloc (change.epcore.chub.160331)

Copied from Perforce
 Change: 21575
 ServerID: perforce.ravenbrook.com
This commit is contained in:
Pekka Pirinen 2000-11-02 14:37:06 +00:00
parent b996c059e9
commit a49f0b3de6

View file

@ -1,6 +1,6 @@
/* impl.c.arenacl: ARENA CLASS USING CLIENT MEMORY
*
* $HopeName$
* $HopeName: MMsrc!arenacl.c(trunk.19) $
* Copyright (C) 2000 Harlequin Limited. All rights reserved.
*
* .design: See design.mps.arena.client.
@ -16,7 +16,7 @@
#include "mpm.h"
#include "mpsacl.h"
SRCID(arenacl, "$HopeName$");
SRCID(arenacl, "$HopeName: MMsrc!arenacl.c(trunk.19) $");
/* ClientArenaStruct -- Client Arena Structure */
@ -337,18 +337,18 @@ static Res chunkAlloc(Addr *baseReturn, Tract *baseTractReturn,
if (pref->high)
b = BTFindShortResRangeHigh(&baseIndex, &limitIndex,
chunk->allocTable,
0, chunk->pages,
chunk->ullagePages, chunk->pages,
pages);
else
b = BTFindShortResRange(&baseIndex, &limitIndex,
chunk->allocTable,
0, chunk->pages,
chunk->ullagePages, chunk->pages,
pages);
if (!b)
return ResRESOURCE;
/* check commit limit, note that if there are multiple reasons */
/* Check commit limit. Note that if there are multiple reasons */
/* for failing the allocation we attempt to return other result codes */
/* in preference to ResCOMMIT_LIMIT. See design.mps.arena.commit-limit */
if (ArenaCommitted(arena) + pages * ChunkPageSize(chunk)