Add extra ASSERTs to PAlloc_AllocPage
This commit is contained in:
parent
ed9a15e97d
commit
3e5eeacf09
@ -171,13 +171,16 @@ PAlloc_AllocPage()
|
||||
|
||||
Spinlock_Lock(&pallocLock);
|
||||
pg = LIST_FIRST(&freeList);
|
||||
ASSERT(pg != NULL);
|
||||
LIST_REMOVE(pg, entries);
|
||||
|
||||
ASSERT(pg->magic == FREEPAGE_MAGIC_FREE);
|
||||
|
||||
info = PAllocGetInfo(pg);
|
||||
ASSERT(info != NULL);
|
||||
ASSERT(info->refCount == 0);
|
||||
info->refCount++;
|
||||
|
||||
ASSERT(pg->magic == FREEPAGE_MAGIC_FREE);
|
||||
pg->magic = FREEPAGE_MAGIC_INUSE;
|
||||
|
||||
freePages--;
|
||||
|
Loading…
Reference in New Issue
Block a user