Author: pschweitzer
Date: Sun Sep 6 10:06:59 2015
New Revision: 69052
URL:
http://svn.reactos.org/svn/reactos?rev=69052&view=rev
Log:
[NTOSKRNL]
Define & use a tag for FsRtlNotify* memory allocations
Modified:
trunk/reactos/ntoskrnl/fsrtl/notify.c
trunk/reactos/ntoskrnl/include/internal/tag.h
Modified: trunk/reactos/ntoskrnl/fsrtl/notify.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/fsrtl/notify.c?re…
==============================================================================
--- trunk/reactos/ntoskrnl/fsrtl/notify.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/fsrtl/notify.c [iso-8859-1] Sun Sep 6 10:06:59 2015
@@ -166,7 +166,7 @@
if (Buffer == NULL)
{
PsChargePoolQuota(NotifyChange->OwningProcess, PagedPool,
BufferLength);
- Buffer = ExAllocatePoolWithTag(PagedPool |
POOL_RAISE_IF_ALLOCATION_FAILURE, BufferLength, 'NrSF');
+ Buffer = ExAllocatePoolWithTag(PagedPool |
POOL_RAISE_IF_ALLOCATION_FAILURE, BufferLength, TAG_FS_NOTIFICATIONS);
NotifyChange->AllocatedBuffer = Buffer;
}
@@ -200,7 +200,7 @@
if (NotifyChange->AllocatedBuffer)
{
PsReturnProcessPagedPoolQuota(NotifyChange->OwningProcess,
NotifyChange->ThisBufferLength);
- ExFreePoolWithTag(NotifyChange->AllocatedBuffer, 'NrSF');
+ ExFreePoolWithTag(NotifyChange->AllocatedBuffer,
TAG_FS_NOTIFICATIONS);
}
/* In case of full name, remember subject context for later deletion */
@@ -1328,7 +1328,7 @@
PsChargePoolQuota(NotifyChange->OwningProcess,
PagedPool, NumberOfBytes);
PoolQuotaCharged = TRUE;
OutputBuffer = ExAllocatePoolWithTag(PagedPool |
POOL_RAISE_IF_ALLOCATION_FAILURE,
- NumberOfBytes,
'NrSF');
+ NumberOfBytes,
TAG_FS_NOTIFICATIONS);
NotifyChange->Buffer = OutputBuffer;
NotifyChange->AllocatedBuffer = OutputBuffer;
}
@@ -1371,7 +1371,7 @@
if (NotifyChange->AllocatedBuffer != NULL)
{
PsReturnProcessPagedPoolQuota(NotifyChange->OwningProcess,
NotifyChange->ThisBufferLength);
- ExFreePoolWithTag(NotifyChange->AllocatedBuffer,
'NrSF');
+ ExFreePoolWithTag(NotifyChange->AllocatedBuffer,
TAG_FS_NOTIFICATIONS);
}
NotifyChange->Buffer = NULL;
Modified: trunk/reactos/ntoskrnl/include/internal/tag.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
==============================================================================
--- trunk/reactos/ntoskrnl/include/internal/tag.h [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/include/internal/tag.h [iso-8859-1] Sun Sep 6 10:06:59 2015
@@ -50,6 +50,7 @@
#define TAG_FILE_SYSTEM 'SYSF'
#define TAG_FS_CHANGE_NOTIFY 'NCSF'
#define IFS_POOL_TAG 'trSF'
+#define TAG_FS_NOTIFICATIONS 'NrSF'
/* formerly located in io/iocomp.c */
#define IOC_TAG 'TCOI'