Author: ros-arm-bringup
Date: Thu Oct 15 21:19:40 2009
New Revision: 43489
URL: http://svn.reactos.org/svn/reactos?rev=43489&view=rev
Log:
- Fix comments.
- Fix reading the incorrect pool type when freeing pool. The PoolType in the entry is offset by 1, so it can be either 1 for NonPaged or 2 for paged. This used to give us index 0 for nonpaged (correct), and index -1 for paged (oops!). Mask by 3 instead, so we get 0 and 1.
Modified:
trunk/reactos/ntoskrnl/mm/ARM3/expool.c
Modified: trunk/reactos/ntoskrnl/mm/ARM3/expool.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/expool.c?…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/ARM3/expool.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/ARM3/expool.c [iso-8859-1] Thu Oct 15 21:19:40 2009
@@ -241,7 +241,7 @@
if (!IsListEmpty(ListHead))
{
//
- // Acquire the nonpaged pool lock now
+ // Acquire the pool lock now
//
OldIrql = ExLockPool(PoolDesc);
@@ -420,7 +420,7 @@
if (FragmentEntry->BlockSize != 1)
{
//
- // Excellent -- acquire the nonpaged pool lock
+ // Excellent -- acquire the pool lock
//
OldIrql = ExLockPool(PoolDesc);
@@ -431,7 +431,7 @@
(PLIST_ENTRY)FragmentEntry + 1);
//
- // Release the nonpaged pool lock
+ // Release the pool lock
//
ExUnlockPool(PoolDesc, OldIrql);
}
@@ -487,7 +487,7 @@
// for this pool type
//
BlockSize = Entry->BlockSize;
- PoolType = (Entry->PoolType & BASE_POOL_TYPE_MASK) - 1;
+ PoolType = (Entry->PoolType & 3) - 1;
PoolDesc = PoolVector[PoolType];
//
@@ -496,7 +496,7 @@
NextEntry = Entry + BlockSize;
//
- // Acquire the nonpaged pool lock
+ // Acquire the pool lock
//
OldIrql = ExLockPool(PoolDesc);
@@ -588,7 +588,7 @@
(PAGE_ALIGN(Entry + Entry->BlockSize) == Entry + Entry->BlockSize))
{
//
- // In this case, release the nonpaged pool lock, and free the page
+ // In this case, release the pool lock, and free the page
//
ExUnlockPool(PoolDesc, OldIrql);
MiFreePoolPages(Entry);
@@ -621,7 +621,7 @@
}
//
- // Insert this new free block, and release the nonpaged pool lock
+ // Insert this new free block, and release the pool lock
//
InsertHeadList(&PoolDesc->ListHeads[BlockSize - 1], (PLIST_ENTRY)Entry + 1);
ExUnlockPool(PoolDesc, OldIrql);