From 8929ef31df3746f86c56e189f7e47bc7c81282cf Mon Sep 17 00:00:00 2001 From: Thomas Faber Date: Sat, 20 Jul 2013 17:46:38 +0000 Subject: [PATCH] [NTOS] - Use more pool tagging svn path=/trunk/; revision=59542 --- reactos/ntoskrnl/config/cmhook.c | 2 +- reactos/ntoskrnl/config/cminit.c | 10 +++++----- reactos/ntoskrnl/config/cmsysini.c | 4 ++-- reactos/ntoskrnl/config/powerpc/cmhardwr.c | 4 ++-- reactos/ntoskrnl/ex/sysinfo.c | 2 +- reactos/ntoskrnl/fsrtl/notify.c | 2 +- reactos/ntoskrnl/mm/ARM3/procsup.c | 2 +- reactos/ntoskrnl/mm/ARM3/section.c | 2 +- reactos/ntoskrnl/mm/freelist.c | 2 +- reactos/ntoskrnl/ps/kill.c | 5 +++-- reactos/ntoskrnl/ps/process.c | 2 +- reactos/ntoskrnl/ps/query.c | 2 +- 12 files changed, 20 insertions(+), 19 deletions(-) diff --git a/reactos/ntoskrnl/config/cmhook.c b/reactos/ntoskrnl/config/cmhook.c index 4f1b86fb1dc..7f8acdf4cb4 100644 --- a/reactos/ntoskrnl/config/cmhook.c +++ b/reactos/ntoskrnl/config/cmhook.c @@ -180,7 +180,7 @@ CmUnRegisterCallback(IN LARGE_INTEGER Cookie) ExReleaseFastMutex(&CmiCallbackLock); /* free the callback */ - ExFreePool(CurrentCallback); + ExFreePoolWithTag(CurrentCallback, 'bcMC'); return STATUS_SUCCESS; } else diff --git a/reactos/ntoskrnl/config/cminit.c b/reactos/ntoskrnl/config/cminit.c index bb3e9d58956..0f297c61323 100644 --- a/reactos/ntoskrnl/config/cminit.c +++ b/reactos/ntoskrnl/config/cminit.c @@ -359,7 +359,7 @@ CmpOpenHiveFiles(IN PCUNICODE_STRING BaseName, if (!NT_SUCCESS(Status)) { /* Close handles and free buffers */ - if (NameBuffer) ExFreePool(NameBuffer); + if (NameBuffer) ExFreePoolWithTag(NameBuffer, TAG_CM); ObDereferenceObject(Event); ZwClose(EventHandle); DPRINT1("ZwCreateFile failed : %lx.\n", Status); @@ -397,7 +397,7 @@ CmpOpenHiveFiles(IN PCUNICODE_STRING BaseName, if (!NT_SUCCESS(Status)) { /* Close handles and free buffers */ - if (NameBuffer) ExFreePool(NameBuffer); + if (NameBuffer) ExFreePoolWithTag(NameBuffer, TAG_CM); ObDereferenceObject(Event); ZwClose(EventHandle); ZwClose(*Primary); @@ -461,7 +461,7 @@ CmpOpenHiveFiles(IN PCUNICODE_STRING BaseName, if (!NT_SUCCESS(Status)) { /* Close handles and free buffers */ - if (NameBuffer) ExFreePool(NameBuffer); + if (NameBuffer) ExFreePoolWithTag(NameBuffer, TAG_CM); ObDereferenceObject(Event); ZwClose(EventHandle); return Status; @@ -471,7 +471,7 @@ CmpOpenHiveFiles(IN PCUNICODE_STRING BaseName, if (FsSizeInformation.BytesPerSector > HBLOCK_SIZE) { /* Close handles and free buffers */ - if (NameBuffer) ExFreePool(NameBuffer); + if (NameBuffer) ExFreePoolWithTag(NameBuffer, TAG_CM); ObDereferenceObject(Event); ZwClose(EventHandle); return STATUS_CANNOT_LOAD_REGISTRY_FILE; @@ -596,7 +596,7 @@ CmpOpenHiveFiles(IN PCUNICODE_STRING BaseName, } /* We're done, close handles and free buffers */ - if (NameBuffer) ExFreePool(NameBuffer); + if (NameBuffer) ExFreePoolWithTag(NameBuffer, TAG_CM); ObDereferenceObject(Event); ZwClose(EventHandle); return STATUS_SUCCESS; diff --git a/reactos/ntoskrnl/config/cmsysini.c b/reactos/ntoskrnl/config/cmsysini.c index dc03e96fdb8..aa69546a6cd 100644 --- a/reactos/ntoskrnl/config/cmsysini.c +++ b/reactos/ntoskrnl/config/cmsysini.c @@ -164,7 +164,7 @@ CmpQueryKeyName(IN PVOID ObjectBody, ((Length < (*ReturnLength)) && (BytesToCopy < sizeof(WCHAR)))) { /* Free the buffer allocated by CmpConstructName */ - ExFreePool(KeyName); + ExFreePoolWithTag(KeyName, TAG_CM); /* Return buffer length failure without writing anything there because nothing fits */ return STATUS_INFO_LENGTH_MISMATCH; @@ -207,7 +207,7 @@ CmpQueryKeyName(IN PVOID ObjectBody, _SEH2_END; /* Free the buffer allocated by CmpConstructName */ - ExFreePool(KeyName); + ExFreePoolWithTag(KeyName, TAG_CM); /* Return status */ return Status; diff --git a/reactos/ntoskrnl/config/powerpc/cmhardwr.c b/reactos/ntoskrnl/config/powerpc/cmhardwr.c index f620f736109..f034f537433 100644 --- a/reactos/ntoskrnl/config/powerpc/cmhardwr.c +++ b/reactos/ntoskrnl/config/powerpc/cmhardwr.c @@ -546,7 +546,7 @@ CmpInitializeMachineDependentConfiguration(IN PLOADER_PARAMETER_BLOCK LoaderBloc } /* Free the configuration data */ - ExFreePool(CmpConfigurationData); + ExFreePoolWithTag(CmpConfigurationData, TAG_CM); } /* Open physical memory */ @@ -824,7 +824,7 @@ CmpInitializeMachineDependentConfiguration(IN PLOADER_PARAMETER_BLOCK LoaderBloc ZwClose(SectionHandle); /* Free the BIOS version string buffer */ - if (BiosVersion) ExFreePool(BiosVersion); + if (BiosVersion) ExFreePoolWithTag(BiosVersion, TAG_CM); Quickie: /* Close the procesor handle */ diff --git a/reactos/ntoskrnl/ex/sysinfo.c b/reactos/ntoskrnl/ex/sysinfo.c index 6fb5e257d4b..0a6fb18199f 100644 --- a/reactos/ntoskrnl/ex/sysinfo.c +++ b/reactos/ntoskrnl/ex/sysinfo.c @@ -787,7 +787,7 @@ QSI_DEF(SystemProcessInformation) RtlCopyMemory(SpiCurrent->ImageName.Buffer, szSrc, SpiCurrent->ImageName.Length); /* Release the memory allocated by SeLocateProcessImageName */ - ExFreePool(ProcessImageName); + ExFreePoolWithTag(ProcessImageName, TAG_SEPA); } else { diff --git a/reactos/ntoskrnl/fsrtl/notify.c b/reactos/ntoskrnl/fsrtl/notify.c index 3fdb49e66b8..0fffc62377a 100644 --- a/reactos/ntoskrnl/fsrtl/notify.c +++ b/reactos/ntoskrnl/fsrtl/notify.c @@ -424,7 +424,7 @@ FsRtlNotifyCleanup(IN PNOTIFY_SYNC NotifySync, } /* Finally, free the notification, as it's not needed anymore */ - ExFreePool(NotifyChange); + ExFreePoolWithTag(NotifyChange, 'FSrN'); } } } diff --git a/reactos/ntoskrnl/mm/ARM3/procsup.c b/reactos/ntoskrnl/mm/ARM3/procsup.c index 4a7fafabbde..71b48b6b20e 100644 --- a/reactos/ntoskrnl/mm/ARM3/procsup.c +++ b/reactos/ntoskrnl/mm/ARM3/procsup.c @@ -1581,7 +1581,7 @@ MiReleaseProcessReferenceToSessionDataPage(IN PMM_SESSION_SPACE SessionGlobal) /* Free the session page tables */ #ifndef _M_AMD64 - ExFreePool(SessionGlobal->PageTables); + ExFreePoolWithTag(SessionGlobal->PageTables, 'tHmM'); #endif ASSERT(!MI_IS_PHYSICAL_ADDRESS(SessionGlobal)); diff --git a/reactos/ntoskrnl/mm/ARM3/section.c b/reactos/ntoskrnl/mm/ARM3/section.c index 1e86307599e..fd2789dae24 100644 --- a/reactos/ntoskrnl/mm/ARM3/section.c +++ b/reactos/ntoskrnl/mm/ARM3/section.c @@ -332,7 +332,7 @@ MiInsertInSystemSpace(IN PMMSESSION Session, PagedPool, HashSize * sizeof(MMVIEW), - ' mM'); + TAG_MM); if (!Session->SystemSpaceViewTable) { /* Failed to allocate a new table, keep the old one for now */ diff --git a/reactos/ntoskrnl/mm/freelist.c b/reactos/ntoskrnl/mm/freelist.c index 9b42038c4f8..0ff52972ebd 100644 --- a/reactos/ntoskrnl/mm/freelist.c +++ b/reactos/ntoskrnl/mm/freelist.c @@ -553,7 +553,7 @@ MmDereferencePage(PFN_NUMBER Pfn) /* It's not a ROS PFN anymore */ Page->u4.AweAllocation = FALSE; - ExFreePool(MI_GET_ROS_DATA(Page)); + ExFreePoolWithTag(MI_GET_ROS_DATA(Page), 'RsPf'); Page->RosMmData = 0; /* Bring it back into the free list */ diff --git a/reactos/ntoskrnl/ps/kill.c b/reactos/ntoskrnl/ps/kill.c index bea94ce9133..da3f90ec4d5 100644 --- a/reactos/ntoskrnl/ps/kill.c +++ b/reactos/ntoskrnl/ps/kill.c @@ -276,7 +276,8 @@ PspDeleteProcess(IN PVOID ObjectBody) if (Process->SeAuditProcessCreationInfo.ImageFileName) { /* Free it */ - ExFreePool(Process->SeAuditProcessCreationInfo.ImageFileName); + ExFreePoolWithTag(Process->SeAuditProcessCreationInfo.ImageFileName, + TAG_SEPA); Process->SeAuditProcessCreationInfo.ImageFileName = NULL; } @@ -679,7 +680,7 @@ PspExitThread(IN NTSTATUS ExitStatus) NextPort = TerminationPort->Next; /* Free the Termination Port Object */ - ExFreePool(TerminationPort); + ExFreePoolWithTag(TerminationPort, '=TsP'); /* Keep looping as long as there is a port */ TerminationPort = NextPort; diff --git a/reactos/ntoskrnl/ps/process.c b/reactos/ntoskrnl/ps/process.c index 7207ee39002..4cfe10fbbb5 100644 --- a/reactos/ntoskrnl/ps/process.c +++ b/reactos/ntoskrnl/ps/process.c @@ -655,7 +655,7 @@ PspCreateProcess(OUT PHANDLE ProcessHandle, Process->SeAuditProcessCreationInfo.ImageFileName = ExAllocatePoolWithTag(PagedPool, sizeof(OBJECT_NAME_INFORMATION), - 'aPeS'); + TAG_SEPA); if (!Process->SeAuditProcessCreationInfo.ImageFileName) { /* Fail */ diff --git a/reactos/ntoskrnl/ps/query.c b/reactos/ntoskrnl/ps/query.c index f575830b4b1..60af504fcd8 100644 --- a/reactos/ntoskrnl/ps/query.c +++ b/reactos/ntoskrnl/ps/query.c @@ -699,7 +699,7 @@ NtQueryInformationProcess(IN HANDLE ProcessHandle, } /* Free the image path */ - ExFreePool(ImageName); + ExFreePoolWithTag(ImageName, TAG_SEPA); } /* Dereference the process */ ObDereferenceObject(Process);