Author: sginsberg
Date: Wed Feb 25 16:05:05 2009
New Revision: 39748
URL:
http://svn.reactos.org/svn/reactos?rev=39748&view=rev
Log:
- Minor optimization to ExFreePoolWithTag -- also reformat slightly.
Modified:
trunk/reactos/ntoskrnl/mm/pool.c
Modified: trunk/reactos/ntoskrnl/mm/pool.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/pool.c?rev=397…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/pool.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/pool.c [iso-8859-1] Wed Feb 25 16:05:05 2009
@@ -251,18 +251,23 @@
/*
* @implemented
*/
-VOID NTAPI
-ExFreePoolWithTag(IN PVOID Block, IN ULONG Tag)
+VOID
+NTAPI
+ExFreePoolWithTag(IN PVOID Block,
+ IN ULONG Tag)
{
ULONG BlockTag;
- if (Block >= MmPagedPoolBase && (char*)Block < ((char*)MmPagedPoolBase
+ MmPagedPoolSize))
- BlockTag = EiGetPagedPoolTag(Block);
- else
- BlockTag = EiGetNonPagedPoolTag(Block);
-
- if (BlockTag != Tag && Tag != 0)
- KeBugCheckEx(BAD_POOL_CALLER, 0x0a, (ULONG_PTR)Block, BlockTag, Tag);
+ if (Tag != 0)
+ {
+ if (Block >= MmPagedPoolBase && (char*)Block <
((char*)MmPagedPoolBase + MmPagedPoolSize))
+ BlockTag = EiGetPagedPoolTag(Block);
+ else
+ BlockTag = EiGetNonPagedPoolTag(Block);
+
+ if (BlockTag != Tag)
+ KeBugCheckEx(BAD_POOL_CALLER, 0x0a, (ULONG_PTR)Block, BlockTag, Tag);
+ }
ExFreePool(Block);
}