- Use more sensible pool tags
[NULL]
- Use pool tagging

svn path=/trunk/; revision=66920
This commit is contained in:
Thomas Faber 2015-03-27 17:20:03 +00:00
parent 62e93f4515
commit e7f2f6a078
8 changed files with 64 additions and 64 deletions

View file

@ -9,7 +9,7 @@
/* INCLUDES ******************************************************************/ /* INCLUDES ******************************************************************/
#include <ntddk.h> #include <wdm.h>
/* FUNCTIONS *****************************************************************/ /* FUNCTIONS *****************************************************************/
@ -183,7 +183,9 @@ DriverEntry(IN PDRIVER_OBJECT DriverObject,
DriverObject->MajorFunction[IRP_MJ_QUERY_INFORMATION] = NullDispatch; DriverObject->MajorFunction[IRP_MJ_QUERY_INFORMATION] = NullDispatch;
/* Allocate the fast I/O dispatch table */ /* Allocate the fast I/O dispatch table */
FastIoDispatch = ExAllocatePool(NonPagedPool, sizeof(FAST_IO_DISPATCH)); FastIoDispatch = ExAllocatePoolWithTag(NonPagedPool,
sizeof(FAST_IO_DISPATCH),
'llun');
if (!FastIoDispatch) if (!FastIoDispatch)
{ {
/* Failed, cleanup */ /* Failed, cleanup */

View file

@ -118,7 +118,7 @@ Bus_PlugInDevice (
index++; index++;
temp[++index] = UNICODE_NULL; temp[++index] = UNICODE_NULL;
pdoData->HardwareIDs = ExAllocatePoolWithTag(NonPagedPool, index*sizeof(WCHAR), 'IPCA'); pdoData->HardwareIDs = ExAllocatePoolWithTag(NonPagedPool, index*sizeof(WCHAR), 'DpcA');
if (!pdoData->HardwareIDs) { if (!pdoData->HardwareIDs) {

View file

@ -465,7 +465,7 @@ acpi_bus_generate_event_dpc(PKDPC Dpc,
ULONG_PTR TypeData = (ULONG_PTR)SystemArgument2; ULONG_PTR TypeData = (ULONG_PTR)SystemArgument2;
KIRQL OldIrql; KIRQL OldIrql;
event = ExAllocatePoolWithTag(NonPagedPool,sizeof(struct acpi_bus_event), 'IPCA'); event = ExAllocatePoolWithTag(NonPagedPool,sizeof(struct acpi_bus_event), 'epcA');
if (!event) if (!event)
return; return;
@ -549,7 +549,7 @@ acpi_bus_receive_event (
memcpy(event, entry, sizeof(struct acpi_bus_event)); memcpy(event, entry, sizeof(struct acpi_bus_event));
ExFreePoolWithTag(entry, 'IPCA'); ExFreePoolWithTag(entry, 'epcA');
return_VALUE(0); return_VALUE(0);
} }
@ -1147,7 +1147,7 @@ acpi_bus_add (
if (!child) if (!child)
return_VALUE(AE_BAD_PARAMETER); return_VALUE(AE_BAD_PARAMETER);
device = ExAllocatePoolWithTag(NonPagedPool,sizeof(struct acpi_device), 'IPCA'); device = ExAllocatePoolWithTag(NonPagedPool,sizeof(struct acpi_device), 'DpcA');
if (!device) { if (!device) {
DPRINT1("Memory allocation error\n"); DPRINT1("Memory allocation error\n");
return_VALUE(-12); return_VALUE(-12);
@ -1263,7 +1263,7 @@ acpi_bus_add (
uid = info->UniqueId.String; uid = info->UniqueId.String;
if (info->Valid & ACPI_VALID_CID) { if (info->Valid & ACPI_VALID_CID) {
cid_list = &info->CompatibleIdList; cid_list = &info->CompatibleIdList;
device->pnp.cid_list = ExAllocatePoolWithTag(NonPagedPool,cid_list->ListSize, 'IPCA'); device->pnp.cid_list = ExAllocatePoolWithTag(NonPagedPool,cid_list->ListSize, 'DpcA');
if (device->pnp.cid_list) if (device->pnp.cid_list)
memcpy(device->pnp.cid_list, cid_list, cid_list->ListSize); memcpy(device->pnp.cid_list, cid_list, cid_list->ListSize);
else else
@ -1326,7 +1326,7 @@ acpi_bus_add (
} }
if (hid) { if (hid) {
device->pnp.hardware_id = ExAllocatePoolWithTag(NonPagedPool, strlen(hid) + 1, 'IPCA'); device->pnp.hardware_id = ExAllocatePoolWithTag(NonPagedPool, strlen(hid) + 1, 'DpcA');
if (device->pnp.hardware_id) { if (device->pnp.hardware_id) {
snprintf(device->pnp.hardware_id, strlen(hid) + 1, "%s", hid); snprintf(device->pnp.hardware_id, strlen(hid) + 1, "%s", hid);
device->flags.hardware_id = 1; device->flags.hardware_id = 1;
@ -1435,12 +1435,12 @@ acpi_bus_add (
end: end:
if (result) { if (result) {
if (device->pnp.cid_list) { if (device->pnp.cid_list) {
ExFreePoolWithTag(device->pnp.cid_list, 'IPCA'); ExFreePoolWithTag(device->pnp.cid_list, 'DpcA');
} }
if (device->pnp.hardware_id) { if (device->pnp.hardware_id) {
ExFreePoolWithTag(device->pnp.hardware_id, 'IPCA'); ExFreePoolWithTag(device->pnp.hardware_id, 'DpcA');
} }
ExFreePoolWithTag(device, 'IPCA'); ExFreePoolWithTag(device, 'DpcA');
return_VALUE(result); return_VALUE(result);
} }
*child = device; *child = device;
@ -1461,13 +1461,13 @@ acpi_bus_remove (
acpi_device_unregister(device); acpi_device_unregister(device);
if (device->pnp.cid_list) if (device->pnp.cid_list)
ExFreePoolWithTag(device->pnp.cid_list, 'IPCA'); ExFreePoolWithTag(device->pnp.cid_list, 'DpcA');
if (device->pnp.hardware_id) if (device->pnp.hardware_id)
ExFreePoolWithTag(device->pnp.hardware_id, 'IPCA'); ExFreePoolWithTag(device->pnp.hardware_id, 'DpcA');
if (device) if (device)
ExFreePoolWithTag(device, 'IPCA'); ExFreePoolWithTag(device, 'DpcA');
return_VALUE(0); return_VALUE(0);
} }

View file

@ -472,7 +472,7 @@ Bus_PDO_QueryDeviceId(
NT_ASSERT(length * sizeof(WCHAR) <= sizeof(temp)); NT_ASSERT(length * sizeof(WCHAR) <= sizeof(temp));
buffer = ExAllocatePoolWithTag (PagedPool, length * sizeof(WCHAR), 'IPCA'); buffer = ExAllocatePoolWithTag(PagedPool, length * sizeof(WCHAR), 'IpcA');
if (!buffer) { if (!buffer) {
status = STATUS_INSUFFICIENT_RESOURCES; status = STATUS_INSUFFICIENT_RESOURCES;
@ -511,7 +511,7 @@ Bus_PDO_QueryDeviceId(
NT_ASSERT(length * sizeof(WCHAR) <= sizeof(temp)); NT_ASSERT(length * sizeof(WCHAR) <= sizeof(temp));
buffer = ExAllocatePoolWithTag (PagedPool, length * sizeof (WCHAR), 'IPCA'); buffer = ExAllocatePoolWithTag(PagedPool, length * sizeof(WCHAR), 'IpcA');
if (!buffer) { if (!buffer) {
status = STATUS_INSUFFICIENT_RESOURCES; status = STATUS_INSUFFICIENT_RESOURCES;
break; break;
@ -577,7 +577,7 @@ Bus_PDO_QueryDeviceId(
NT_ASSERT(length * sizeof(WCHAR) <= sizeof(temp)); NT_ASSERT(length * sizeof(WCHAR) <= sizeof(temp));
buffer = ExAllocatePoolWithTag (PagedPool, length * sizeof(WCHAR), 'IPCA'); buffer = ExAllocatePoolWithTag(PagedPool, length * sizeof(WCHAR), 'IpcA');
if (!buffer) { if (!buffer) {
status = STATUS_INSUFFICIENT_RESOURCES; status = STATUS_INSUFFICIENT_RESOURCES;
@ -648,7 +648,7 @@ Bus_PDO_QueryDeviceId(
NT_ASSERT(length * sizeof(WCHAR) <= sizeof(temp)); NT_ASSERT(length * sizeof(WCHAR) <= sizeof(temp));
buffer = ExAllocatePoolWithTag (PagedPool, length * sizeof(WCHAR), 'IPCA'); buffer = ExAllocatePoolWithTag(PagedPool, length * sizeof(WCHAR), 'IpcA');
if (!buffer) if (!buffer)
{ {
status = STATUS_INSUFFICIENT_RESOURCES; status = STATUS_INSUFFICIENT_RESOURCES;
@ -757,7 +757,7 @@ Bus_PDO_QueryDeviceText(
else else
Temp = L"Other ACPI device"; Temp = L"Other ACPI device";
Buffer = ExAllocatePoolWithTag (PagedPool, (wcslen(Temp) + 1) * sizeof(WCHAR), 'IPCA'); Buffer = ExAllocatePoolWithTag(PagedPool, (wcslen(Temp) + 1) * sizeof(WCHAR), 'IpcA');
if (!Buffer) { if (!Buffer) {
status = STATUS_INSUFFICIENT_RESOURCES; status = STATUS_INSUFFICIENT_RESOURCES;
@ -833,7 +833,7 @@ Bus_PDO_QueryResources(
DPRINT("Found PCI root hub: %d\n", BusNumber); DPRINT("Found PCI root hub: %d\n", BusNumber);
ResourceListSize = sizeof(CM_RESOURCE_LIST); ResourceListSize = sizeof(CM_RESOURCE_LIST);
ResourceList = (PCM_RESOURCE_LIST)ExAllocatePoolWithTag(PagedPool, ResourceListSize, 'IPCA'); ResourceList = ExAllocatePoolWithTag(PagedPool, ResourceListSize, 'RpcA');
if (!ResourceList) if (!ResourceList)
return STATUS_INSUFFICIENT_RESOURCES; return STATUS_INSUFFICIENT_RESOURCES;
@ -863,7 +863,7 @@ Bus_PDO_QueryResources(
return Irp->IoStatus.Status; return Irp->IoStatus.Status;
} }
Buffer.Pointer = ExAllocatePoolWithTag(PagedPool, Buffer.Length, 'IPCA'); Buffer.Pointer = ExAllocatePoolWithTag(PagedPool, Buffer.Length, 'BpcA');
if (!Buffer.Pointer) if (!Buffer.Pointer)
return STATUS_INSUFFICIENT_RESOURCES; return STATUS_INSUFFICIENT_RESOURCES;
@ -932,11 +932,11 @@ Bus_PDO_QueryResources(
/* Allocate memory */ /* Allocate memory */
ResourceListSize = sizeof(CM_RESOURCE_LIST) + sizeof(CM_PARTIAL_RESOURCE_DESCRIPTOR) * (NumberOfResources - 1); ResourceListSize = sizeof(CM_RESOURCE_LIST) + sizeof(CM_PARTIAL_RESOURCE_DESCRIPTOR) * (NumberOfResources - 1);
ResourceList = (PCM_RESOURCE_LIST)ExAllocatePoolWithTag(PagedPool, ResourceListSize, 'IPCA'); ResourceList = ExAllocatePoolWithTag(PagedPool, ResourceListSize, 'RpcA');
if (!ResourceList) if (!ResourceList)
{ {
ExFreePoolWithTag(Buffer.Pointer, 'IPCA'); ExFreePoolWithTag(Buffer.Pointer, 'BpcA');
return STATUS_INSUFFICIENT_RESOURCES; return STATUS_INSUFFICIENT_RESOURCES;
} }
ResourceList->Count = 1; ResourceList->Count = 1;
@ -1282,7 +1282,7 @@ Bus_PDO_QueryResources(
resource = ACPI_NEXT_RESOURCE(resource); resource = ACPI_NEXT_RESOURCE(resource);
} }
ExFreePoolWithTag(Buffer.Pointer, 'IPCA'); ExFreePoolWithTag(Buffer.Pointer, 'BpcA');
Irp->IoStatus.Information = (ULONG_PTR)ResourceList; Irp->IoStatus.Information = (ULONG_PTR)ResourceList;
return STATUS_SUCCESS; return STATUS_SUCCESS;
} }
@ -1335,7 +1335,7 @@ Bus_PDO_QueryResourceRequirements(
break; break;
} }
Buffer.Pointer = ExAllocatePoolWithTag(PagedPool, Buffer.Length, 'IPCA'); Buffer.Pointer = ExAllocatePoolWithTag(PagedPool, Buffer.Length, 'BpcA');
if (!Buffer.Pointer) if (!Buffer.Pointer)
return STATUS_INSUFFICIENT_RESOURCES; return STATUS_INSUFFICIENT_RESOURCES;
@ -1405,11 +1405,11 @@ Bus_PDO_QueryResourceRequirements(
} }
RequirementsListSize = sizeof(IO_RESOURCE_REQUIREMENTS_LIST) + sizeof(IO_RESOURCE_DESCRIPTOR) * (NumberOfResources - 1); RequirementsListSize = sizeof(IO_RESOURCE_REQUIREMENTS_LIST) + sizeof(IO_RESOURCE_DESCRIPTOR) * (NumberOfResources - 1);
RequirementsList = (PIO_RESOURCE_REQUIREMENTS_LIST)ExAllocatePoolWithTag(PagedPool, RequirementsListSize, 'IPCA'); RequirementsList = ExAllocatePoolWithTag(PagedPool, RequirementsListSize, 'RpcA');
if (!RequirementsList) if (!RequirementsList)
{ {
ExFreePoolWithTag(Buffer.Pointer, 'IPCA'); ExFreePoolWithTag(Buffer.Pointer, 'BpcA');
return STATUS_INSUFFICIENT_RESOURCES; return STATUS_INSUFFICIENT_RESOURCES;
} }
RequirementsList->ListSize = RequirementsListSize; RequirementsList->ListSize = RequirementsListSize;
@ -1781,7 +1781,7 @@ Bus_PDO_QueryResourceRequirements(
} }
resource = ACPI_NEXT_RESOURCE(resource); resource = ACPI_NEXT_RESOURCE(resource);
} }
ExFreePoolWithTag(Buffer.Pointer, 'IPCA'); ExFreePoolWithTag(Buffer.Pointer, 'BpcA');
Irp->IoStatus.Information = (ULONG_PTR)RequirementsList; Irp->IoStatus.Information = (ULONG_PTR)RequirementsList;
@ -1846,10 +1846,9 @@ Return Value:
ASSERTMSG("Someone above is handling TargetDeviceRelation", !deviceRelations); ASSERTMSG("Someone above is handling TargetDeviceRelation", !deviceRelations);
} }
deviceRelations = (PDEVICE_RELATIONS) deviceRelations = ExAllocatePoolWithTag(PagedPool,
ExAllocatePoolWithTag (PagedPool, sizeof(DEVICE_RELATIONS),
sizeof(DEVICE_RELATIONS), 'IpcA');
'IPCA');
if (!deviceRelations) { if (!deviceRelations) {
status = STATUS_INSUFFICIENT_RESOURCES; status = STATUS_INSUFFICIENT_RESOURCES;
break; break;
@ -1908,8 +1907,9 @@ Return Value:
PAGED_CODE (); PAGED_CODE ();
busInfo = ExAllocatePoolWithTag (PagedPool, sizeof(PNP_BUS_INFORMATION), busInfo = ExAllocatePoolWithTag(PagedPool,
'IPCA'); sizeof(PNP_BUS_INFORMATION),
'IpcA');
if (busInfo == NULL) { if (busInfo == NULL) {
return STATUS_INSUFFICIENT_RESOURCES; return STATUS_INSUFFICIENT_RESOURCES;

View file

@ -40,7 +40,7 @@ Bus_PDO_EvalMethod(PPDO_DEVICE_DATA DeviceData,
ParamList.Count = 1; ParamList.Count = 1;
ParamList.Pointer = ExAllocatePoolWithTag(NonPagedPool, sizeof(ACPI_OBJECT), 'IPCA'); ParamList.Pointer = ExAllocatePoolWithTag(NonPagedPool, sizeof(ACPI_OBJECT), 'OpcA');
if (!ParamList.Pointer) return STATUS_INSUFFICIENT_RESOURCES; if (!ParamList.Pointer) return STATUS_INSUFFICIENT_RESOURCES;
ParamList.Pointer[0].Type = ACPI_TYPE_INTEGER; ParamList.Pointer[0].Type = ACPI_TYPE_INTEGER;
@ -55,7 +55,7 @@ Bus_PDO_EvalMethod(PPDO_DEVICE_DATA DeviceData,
ParamList.Count = 1; ParamList.Count = 1;
ParamList.Pointer = ExAllocatePoolWithTag(NonPagedPool, sizeof(ACPI_OBJECT), 'IPCA'); ParamList.Pointer = ExAllocatePoolWithTag(NonPagedPool, sizeof(ACPI_OBJECT), 'OpcA');
if (!ParamList.Pointer) return STATUS_INSUFFICIENT_RESOURCES; if (!ParamList.Pointer) return STATUS_INSUFFICIENT_RESOURCES;
ParamList.Pointer[0].String.Pointer = (CHAR*)SimpleStr->String; ParamList.Pointer[0].String.Pointer = (CHAR*)SimpleStr->String;
@ -73,7 +73,7 @@ Bus_PDO_EvalMethod(PPDO_DEVICE_DATA DeviceData,
&RetBuff); &RetBuff);
if (ParamList.Count != 0) if (ParamList.Count != 0)
ExFreePoolWithTag(ParamList.Pointer, 'IPCA'); ExFreePoolWithTag(ParamList.Pointer, 'OpcA');
if (ACPI_SUCCESS(Status)) if (ACPI_SUCCESS(Status))
{ {
@ -114,7 +114,7 @@ Bus_PDO_EvalMethod(PPDO_DEVICE_DATA DeviceData,
ExtraParamLength = 0; ExtraParamLength = 0;
OutputBuf = ExAllocatePoolWithTag(NonPagedPool, sizeof(ACPI_EVAL_OUTPUT_BUFFER) + OutputBuf = ExAllocatePoolWithTag(NonPagedPool, sizeof(ACPI_EVAL_OUTPUT_BUFFER) +
ExtraParamLength, 'IPCA'); ExtraParamLength, 'BpcA');
if (!OutputBuf) return STATUS_INSUFFICIENT_RESOURCES; if (!OutputBuf) return STATUS_INSUFFICIENT_RESOURCES;
OutputBuf->Signature = ACPI_EVAL_OUTPUT_BUFFER_SIGNATURE; OutputBuf->Signature = ACPI_EVAL_OUTPUT_BUFFER_SIGNATURE;
@ -150,12 +150,12 @@ Bus_PDO_EvalMethod(PPDO_DEVICE_DATA DeviceData,
RtlCopyMemory(Irp->AssociatedIrp.SystemBuffer, OutputBuf, sizeof(ACPI_EVAL_OUTPUT_BUFFER) + RtlCopyMemory(Irp->AssociatedIrp.SystemBuffer, OutputBuf, sizeof(ACPI_EVAL_OUTPUT_BUFFER) +
ExtraParamLength); ExtraParamLength);
Irp->IoStatus.Information = sizeof(ACPI_EVAL_OUTPUT_BUFFER) + ExtraParamLength; Irp->IoStatus.Information = sizeof(ACPI_EVAL_OUTPUT_BUFFER) + ExtraParamLength;
ExFreePoolWithTag(OutputBuf, 'IPCA'); ExFreePoolWithTag(OutputBuf, 'BpcA');
return STATUS_SUCCESS; return STATUS_SUCCESS;
} }
else else
{ {
ExFreePoolWithTag(OutputBuf, 'IPCA'); ExFreePoolWithTag(OutputBuf, 'BpcA');
return STATUS_BUFFER_TOO_SMALL; return STATUS_BUFFER_TOO_SMALL;
} }
} }

View file

@ -123,8 +123,7 @@ Bus_AddDevice(
goto End; goto End;
} }
deviceName = ExAllocatePoolWithTag (NonPagedPool, deviceName = ExAllocatePoolWithTag(NonPagedPool, nameLength, 'MpcA');
nameLength, 'IPCA');
if (NULL == deviceName) { if (NULL == deviceName) {
DPRINT1("AddDevice: no memory to alloc for deviceName(0x%x)\n", nameLength); DPRINT1("AddDevice: no memory to alloc for deviceName(0x%x)\n", nameLength);
@ -160,7 +159,7 @@ Bus_AddDevice(
End: End:
if (deviceName){ if (deviceName){
ExFreePoolWithTag(deviceName, 'IPCA'); ExFreePoolWithTag(deviceName, 'MpcA');
} }
if (!NT_SUCCESS(status) && deviceObject){ if (!NT_SUCCESS(status) && deviceObject){
if (deviceData && deviceData->NextLowerDriver){ if (deviceData && deviceData->NextLowerDriver){
@ -376,7 +375,7 @@ AcpiRegQueryValue(IN HANDLE KeyHandle,
BufferLength += FIELD_OFFSET(KEY_VALUE_PARTIAL_INFORMATION, Data); BufferLength += FIELD_OFFSET(KEY_VALUE_PARTIAL_INFORMATION, Data);
/* Allocate memory for the value */ /* Allocate memory for the value */
ValueInfo = ExAllocatePoolWithTag(PagedPool, BufferLength, 'IPCA'); ValueInfo = ExAllocatePoolWithTag(PagedPool, BufferLength, 'MpcA');
if (ValueInfo == NULL) if (ValueInfo == NULL)
return STATUS_NO_MEMORY; return STATUS_NO_MEMORY;
} }
@ -436,7 +435,7 @@ AcpiRegQueryValue(IN HANDLE KeyHandle,
/* Free the memory and return status */ /* Free the memory and return status */
if (ValueInfo != NULL) if (ValueInfo != NULL)
{ {
ExFreePoolWithTag(ValueInfo, 'IPCA'); ExFreePoolWithTag(ValueInfo, 'MpcA');
} }
return Status; return Status;
@ -487,7 +486,7 @@ GetProcessorInformation(VOID)
/* Allocate a buffer large enough to be zero terminated */ /* Allocate a buffer large enough to be zero terminated */
Length += sizeof(UNICODE_NULL); Length += sizeof(UNICODE_NULL);
ProcessorIdentifier = ExAllocatePoolWithTag(PagedPool, Length, 'IPCA'); ProcessorIdentifier = ExAllocatePoolWithTag(PagedPool, Length, 'IpcA');
if (ProcessorIdentifier == NULL) if (ProcessorIdentifier == NULL)
{ {
DPRINT1("Failed to allocate 0x%lx bytes\n", Length); DPRINT1("Failed to allocate 0x%lx bytes\n", Length);
@ -522,7 +521,7 @@ GetProcessorInformation(VOID)
/* Allocate a buffer large enough to be zero terminated */ /* Allocate a buffer large enough to be zero terminated */
Length += sizeof(UNICODE_NULL); Length += sizeof(UNICODE_NULL);
ProcessorNameString = ExAllocatePoolWithTag(PagedPool, Length, 'IPCA'); ProcessorNameString = ExAllocatePoolWithTag(PagedPool, Length, 'IpcA');
if (ProcessorNameString == NULL) if (ProcessorNameString == NULL)
{ {
DPRINT1("Failed to allocate 0x%lx bytes\n", Length); DPRINT1("Failed to allocate 0x%lx bytes\n", Length);
@ -557,7 +556,7 @@ GetProcessorInformation(VOID)
/* Allocate a buffer large enough to be zero terminated */ /* Allocate a buffer large enough to be zero terminated */
Length += sizeof(UNICODE_NULL); Length += sizeof(UNICODE_NULL);
ProcessorVendorIdentifier = ExAllocatePoolWithTag(PagedPool, Length, 'IPCA'); ProcessorVendorIdentifier = ExAllocatePoolWithTag(PagedPool, Length, 'IpcA');
if (ProcessorVendorIdentifier == NULL) if (ProcessorVendorIdentifier == NULL)
{ {
DPRINT1("Failed to allocate 0x%lx bytes\n", Length); DPRINT1("Failed to allocate 0x%lx bytes\n", Length);
@ -617,7 +616,7 @@ GetProcessorInformation(VOID)
1) * sizeof(WCHAR); 1) * sizeof(WCHAR);
/* Allocate a buffer to the data */ /* Allocate a buffer to the data */
HardwareIdsBuffer = ExAllocatePoolWithTag(PagedPool, HardwareIdsLength, 'IPCA'); HardwareIdsBuffer = ExAllocatePoolWithTag(PagedPool, HardwareIdsLength, 'IpcA');
if (HardwareIdsBuffer == NULL) if (HardwareIdsBuffer == NULL)
{ {
Status = STATUS_INSUFFICIENT_RESOURCES; Status = STATUS_INSUFFICIENT_RESOURCES;
@ -656,15 +655,15 @@ done:
ZwClose(ProcessorHandle); ZwClose(ProcessorHandle);
if (ProcessorIdentifier != NULL) if (ProcessorIdentifier != NULL)
ExFreePoolWithTag(ProcessorIdentifier, 'IPCA'); ExFreePoolWithTag(ProcessorIdentifier, 'IpcA');
if (ProcessorVendorIdentifier != NULL) if (ProcessorVendorIdentifier != NULL)
ExFreePoolWithTag(ProcessorVendorIdentifier, 'IPCA'); ExFreePoolWithTag(ProcessorVendorIdentifier, 'IpcA');
if (!NT_SUCCESS(Status)) if (!NT_SUCCESS(Status))
{ {
if (HardwareIdsBuffer != NULL) if (HardwareIdsBuffer != NULL)
ExFreePoolWithTag(HardwareIdsBuffer, 'IPCA'); ExFreePoolWithTag(HardwareIdsBuffer, 'IpcA');
} }
return Status; return Status;

View file

@ -162,7 +162,7 @@ void *
AcpiOsAllocate (ACPI_SIZE size) AcpiOsAllocate (ACPI_SIZE size)
{ {
DPRINT("AcpiOsAllocate size %d\n",size); DPRINT("AcpiOsAllocate size %d\n",size);
return ExAllocatePoolWithTag(NonPagedPool, size, 'IPCA'); return ExAllocatePoolWithTag(NonPagedPool, size, 'ipcA');
} }
void void
@ -170,7 +170,7 @@ AcpiOsFree(void *ptr)
{ {
if (!ptr) if (!ptr)
DPRINT1("Attempt to free null pointer!!!\n"); DPRINT1("Attempt to free null pointer!!!\n");
ExFreePoolWithTag(ptr, 'IPCA'); ExFreePoolWithTag(ptr, 'ipcA');
} }
BOOLEAN BOOLEAN
@ -281,7 +281,7 @@ AcpiOsCreateMutex(
return AE_BAD_PARAMETER; return AE_BAD_PARAMETER;
} }
Mutex = ExAllocatePool(NonPagedPool, sizeof(FAST_MUTEX)); Mutex = ExAllocatePoolWithTag(NonPagedPool, sizeof(FAST_MUTEX), 'LpcA');
if (!Mutex) return AE_NO_MEMORY; if (!Mutex) return AE_NO_MEMORY;
ExInitializeFastMutex(Mutex); ExInitializeFastMutex(Mutex);
@ -301,7 +301,7 @@ AcpiOsDeleteMutex(
return; return;
} }
ExFreePool(Handle); ExFreePoolWithTag(Handle, 'LpcA');
} }
ACPI_STATUS ACPI_STATUS
@ -364,7 +364,7 @@ AcpiOsCreateSemaphore(
return AE_BAD_PARAMETER; return AE_BAD_PARAMETER;
} }
Sem = ExAllocatePool(NonPagedPool, sizeof(ACPI_SEM)); Sem = ExAllocatePoolWithTag(NonPagedPool, sizeof(ACPI_SEM), 'LpcA');
if (!Sem) return AE_NO_MEMORY; if (!Sem) return AE_NO_MEMORY;
Sem->CurrentUnits = InitialUnits; Sem->CurrentUnits = InitialUnits;
@ -386,7 +386,7 @@ AcpiOsDeleteSemaphore(
return AE_BAD_PARAMETER; return AE_BAD_PARAMETER;
} }
ExFreePool(Handle); ExFreePoolWithTag(Handle, 'LpcA');
return AE_OK; return AE_OK;
} }
@ -473,7 +473,7 @@ AcpiOsCreateLock(
return AE_BAD_PARAMETER; return AE_BAD_PARAMETER;
} }
SpinLock = ExAllocatePool(NonPagedPool, sizeof(KSPIN_LOCK)); SpinLock = ExAllocatePoolWithTag(NonPagedPool, sizeof(KSPIN_LOCK), 'LpcA');
if (!SpinLock) return AE_NO_MEMORY; if (!SpinLock) return AE_NO_MEMORY;
KeInitializeSpinLock(SpinLock); KeInitializeSpinLock(SpinLock);
@ -493,7 +493,7 @@ AcpiOsDeleteLock(
return; return;
} }
ExFreePool(Handle); ExFreePoolWithTag(Handle, 'LpcA');
} }
ACPI_CPU_FLAGS ACPI_CPU_FLAGS

View file

@ -188,8 +188,7 @@ Bus_FDO_PnP (
length = sizeof(DEVICE_RELATIONS) + length = sizeof(DEVICE_RELATIONS) +
(((numPdosPresent + prevcount) - 1) * sizeof (PDEVICE_OBJECT)); (((numPdosPresent + prevcount) - 1) * sizeof (PDEVICE_OBJECT));
relations = (PDEVICE_RELATIONS) ExAllocatePoolWithTag (PagedPool, relations = ExAllocatePoolWithTag(PagedPool, length, 'IpcA');
length, 'IPCA');
if (NULL == relations) { if (NULL == relations) {
// //
@ -237,7 +236,7 @@ Bus_FDO_PnP (
// one. // one.
// //
if (oldRelations) { if (oldRelations) {
ExFreePool (oldRelations); ExFreePoolWithTag(oldRelations, 0);
} }
Irp->IoStatus.Information = (ULONG_PTR) relations; Irp->IoStatus.Information = (ULONG_PTR) relations;
@ -399,7 +398,7 @@ Bus_DestroyPdo (
// //
if (PdoData->HardwareIDs) { if (PdoData->HardwareIDs) {
ExFreePoolWithTag (PdoData->HardwareIDs, 'IPCA'); ExFreePoolWithTag(PdoData->HardwareIDs, 'DpcA');
PdoData->HardwareIDs = NULL; PdoData->HardwareIDs = NULL;
} }