Author: tfaber Date: Fri Mar 27 17:20:03 2015 New Revision: 66920
URL: http://svn.reactos.org/svn/reactos?rev=66920&view=rev Log: [ACPI] - Use more sensible pool tags [NULL] - Use pool tagging
Modified: trunk/reactos/drivers/base/null/null.c trunk/reactos/drivers/bus/acpi/acpienum.c trunk/reactos/drivers/bus/acpi/busmgr/bus.c trunk/reactos/drivers/bus/acpi/buspdo.c trunk/reactos/drivers/bus/acpi/eval.c trunk/reactos/drivers/bus/acpi/main.c trunk/reactos/drivers/bus/acpi/osl.c trunk/reactos/drivers/bus/acpi/pnp.c
Modified: trunk/reactos/drivers/base/null/null.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/base/null/null.c?re... ============================================================================== --- trunk/reactos/drivers/base/null/null.c [iso-8859-1] (original) +++ trunk/reactos/drivers/base/null/null.c [iso-8859-1] Fri Mar 27 17:20:03 2015 @@ -9,7 +9,7 @@
/* INCLUDES ******************************************************************/
-#include <ntddk.h> +#include <wdm.h>
/* FUNCTIONS *****************************************************************/
@@ -183,7 +183,9 @@ DriverObject->MajorFunction[IRP_MJ_QUERY_INFORMATION] = NullDispatch;
/* Allocate the fast I/O dispatch table */ - FastIoDispatch = ExAllocatePool(NonPagedPool, sizeof(FAST_IO_DISPATCH)); + FastIoDispatch = ExAllocatePoolWithTag(NonPagedPool, + sizeof(FAST_IO_DISPATCH), + 'llun'); if (!FastIoDispatch) { /* Failed, cleanup */
Modified: trunk/reactos/drivers/bus/acpi/acpienum.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpienum.c... ============================================================================== --- trunk/reactos/drivers/bus/acpi/acpienum.c [iso-8859-1] (original) +++ trunk/reactos/drivers/bus/acpi/acpienum.c [iso-8859-1] Fri Mar 27 17:20:03 2015 @@ -118,7 +118,7 @@ index++; temp[++index] = UNICODE_NULL;
- pdoData->HardwareIDs = ExAllocatePoolWithTag(NonPagedPool, index*sizeof(WCHAR), 'IPCA'); + pdoData->HardwareIDs = ExAllocatePoolWithTag(NonPagedPool, index*sizeof(WCHAR), 'DpcA');
if (!pdoData->HardwareIDs) {
Modified: trunk/reactos/drivers/bus/acpi/busmgr/bus.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/busmgr/bus... ============================================================================== --- trunk/reactos/drivers/bus/acpi/busmgr/bus.c [iso-8859-1] (original) +++ trunk/reactos/drivers/bus/acpi/busmgr/bus.c [iso-8859-1] Fri Mar 27 17:20:03 2015 @@ -465,7 +465,7 @@ ULONG_PTR TypeData = (ULONG_PTR)SystemArgument2; KIRQL OldIrql;
- event = ExAllocatePoolWithTag(NonPagedPool,sizeof(struct acpi_bus_event), 'IPCA'); + event = ExAllocatePoolWithTag(NonPagedPool,sizeof(struct acpi_bus_event), 'epcA'); if (!event) return;
@@ -549,7 +549,7 @@
memcpy(event, entry, sizeof(struct acpi_bus_event));
- ExFreePoolWithTag(entry, 'IPCA'); + ExFreePoolWithTag(entry, 'epcA'); return_VALUE(0); }
@@ -1147,7 +1147,7 @@ if (!child) return_VALUE(AE_BAD_PARAMETER);
- device = ExAllocatePoolWithTag(NonPagedPool,sizeof(struct acpi_device), 'IPCA'); + device = ExAllocatePoolWithTag(NonPagedPool,sizeof(struct acpi_device), 'DpcA'); if (!device) { DPRINT1("Memory allocation error\n"); return_VALUE(-12); @@ -1263,7 +1263,7 @@ uid = info->UniqueId.String; if (info->Valid & ACPI_VALID_CID) { 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) memcpy(device->pnp.cid_list, cid_list, cid_list->ListSize); else @@ -1326,7 +1326,7 @@ }
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) { snprintf(device->pnp.hardware_id, strlen(hid) + 1, "%s", hid); device->flags.hardware_id = 1; @@ -1435,12 +1435,12 @@ end: if (result) { if (device->pnp.cid_list) { - ExFreePoolWithTag(device->pnp.cid_list, 'IPCA'); + ExFreePoolWithTag(device->pnp.cid_list, 'DpcA'); } 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); } *child = device; @@ -1461,13 +1461,13 @@ acpi_device_unregister(device);
if (device->pnp.cid_list) - ExFreePoolWithTag(device->pnp.cid_list, 'IPCA'); + ExFreePoolWithTag(device->pnp.cid_list, 'DpcA');
if (device->pnp.hardware_id) - ExFreePoolWithTag(device->pnp.hardware_id, 'IPCA'); + ExFreePoolWithTag(device->pnp.hardware_id, 'DpcA');
if (device) - ExFreePoolWithTag(device, 'IPCA'); + ExFreePoolWithTag(device, 'DpcA');
return_VALUE(0); }
Modified: trunk/reactos/drivers/bus/acpi/buspdo.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/buspdo.c?r... ============================================================================== --- trunk/reactos/drivers/bus/acpi/buspdo.c [iso-8859-1] (original) +++ trunk/reactos/drivers/bus/acpi/buspdo.c [iso-8859-1] Fri Mar 27 17:20:03 2015 @@ -472,7 +472,7 @@
NT_ASSERT(length * sizeof(WCHAR) <= sizeof(temp));
- buffer = ExAllocatePoolWithTag (PagedPool, length * sizeof(WCHAR), 'IPCA'); + buffer = ExAllocatePoolWithTag(PagedPool, length * sizeof(WCHAR), 'IpcA');
if (!buffer) { status = STATUS_INSUFFICIENT_RESOURCES; @@ -511,7 +511,7 @@
NT_ASSERT(length * sizeof(WCHAR) <= sizeof(temp));
- buffer = ExAllocatePoolWithTag (PagedPool, length * sizeof (WCHAR), 'IPCA'); + buffer = ExAllocatePoolWithTag(PagedPool, length * sizeof(WCHAR), 'IpcA'); if (!buffer) { status = STATUS_INSUFFICIENT_RESOURCES; break; @@ -577,7 +577,7 @@
NT_ASSERT(length * sizeof(WCHAR) <= sizeof(temp));
- buffer = ExAllocatePoolWithTag (PagedPool, length * sizeof(WCHAR), 'IPCA'); + buffer = ExAllocatePoolWithTag(PagedPool, length * sizeof(WCHAR), 'IpcA');
if (!buffer) { status = STATUS_INSUFFICIENT_RESOURCES; @@ -648,7 +648,7 @@
NT_ASSERT(length * sizeof(WCHAR) <= sizeof(temp));
- buffer = ExAllocatePoolWithTag (PagedPool, length * sizeof(WCHAR), 'IPCA'); + buffer = ExAllocatePoolWithTag(PagedPool, length * sizeof(WCHAR), 'IpcA'); if (!buffer) { status = STATUS_INSUFFICIENT_RESOURCES; @@ -757,7 +757,7 @@ else 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) { status = STATUS_INSUFFICIENT_RESOURCES; @@ -833,7 +833,7 @@ DPRINT("Found PCI root hub: %d\n", BusNumber);
ResourceListSize = sizeof(CM_RESOURCE_LIST); - ResourceList = (PCM_RESOURCE_LIST)ExAllocatePoolWithTag(PagedPool, ResourceListSize, 'IPCA'); + ResourceList = ExAllocatePoolWithTag(PagedPool, ResourceListSize, 'RpcA'); if (!ResourceList) return STATUS_INSUFFICIENT_RESOURCES;
@@ -863,7 +863,7 @@ return Irp->IoStatus.Status; }
- Buffer.Pointer = ExAllocatePoolWithTag(PagedPool, Buffer.Length, 'IPCA'); + Buffer.Pointer = ExAllocatePoolWithTag(PagedPool, Buffer.Length, 'BpcA'); if (!Buffer.Pointer) return STATUS_INSUFFICIENT_RESOURCES;
@@ -932,11 +932,11 @@
/* Allocate memory */ 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) { - ExFreePoolWithTag(Buffer.Pointer, 'IPCA'); + ExFreePoolWithTag(Buffer.Pointer, 'BpcA'); return STATUS_INSUFFICIENT_RESOURCES; } ResourceList->Count = 1; @@ -1282,7 +1282,7 @@ resource = ACPI_NEXT_RESOURCE(resource); }
- ExFreePoolWithTag(Buffer.Pointer, 'IPCA'); + ExFreePoolWithTag(Buffer.Pointer, 'BpcA'); Irp->IoStatus.Information = (ULONG_PTR)ResourceList; return STATUS_SUCCESS; } @@ -1335,7 +1335,7 @@ break; }
- Buffer.Pointer = ExAllocatePoolWithTag(PagedPool, Buffer.Length, 'IPCA'); + Buffer.Pointer = ExAllocatePoolWithTag(PagedPool, Buffer.Length, 'BpcA'); if (!Buffer.Pointer) return STATUS_INSUFFICIENT_RESOURCES;
@@ -1405,11 +1405,11 @@ }
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) { - ExFreePoolWithTag(Buffer.Pointer, 'IPCA'); + ExFreePoolWithTag(Buffer.Pointer, 'BpcA'); return STATUS_INSUFFICIENT_RESOURCES; } RequirementsList->ListSize = RequirementsListSize; @@ -1781,7 +1781,7 @@ } resource = ACPI_NEXT_RESOURCE(resource); } - ExFreePoolWithTag(Buffer.Pointer, 'IPCA'); + ExFreePoolWithTag(Buffer.Pointer, 'BpcA');
Irp->IoStatus.Information = (ULONG_PTR)RequirementsList;
@@ -1846,10 +1846,9 @@ ASSERTMSG("Someone above is handling TargetDeviceRelation", !deviceRelations); }
- deviceRelations = (PDEVICE_RELATIONS) - ExAllocatePoolWithTag (PagedPool, - sizeof(DEVICE_RELATIONS), - 'IPCA'); + deviceRelations = ExAllocatePoolWithTag(PagedPool, + sizeof(DEVICE_RELATIONS), + 'IpcA'); if (!deviceRelations) { status = STATUS_INSUFFICIENT_RESOURCES; break; @@ -1908,8 +1907,9 @@
PAGED_CODE ();
- busInfo = ExAllocatePoolWithTag (PagedPool, sizeof(PNP_BUS_INFORMATION), - 'IPCA'); + busInfo = ExAllocatePoolWithTag(PagedPool, + sizeof(PNP_BUS_INFORMATION), + 'IpcA');
if (busInfo == NULL) { return STATUS_INSUFFICIENT_RESOURCES;
Modified: trunk/reactos/drivers/bus/acpi/eval.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/eval.c?rev... ============================================================================== --- trunk/reactos/drivers/bus/acpi/eval.c [iso-8859-1] (original) +++ trunk/reactos/drivers/bus/acpi/eval.c [iso-8859-1] Fri Mar 27 17:20:03 2015 @@ -40,7 +40,7 @@
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;
ParamList.Pointer[0].Type = ACPI_TYPE_INTEGER; @@ -55,7 +55,7 @@
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;
ParamList.Pointer[0].String.Pointer = (CHAR*)SimpleStr->String; @@ -73,7 +73,7 @@ &RetBuff);
if (ParamList.Count != 0) - ExFreePoolWithTag(ParamList.Pointer, 'IPCA'); + ExFreePoolWithTag(ParamList.Pointer, 'OpcA');
if (ACPI_SUCCESS(Status)) { @@ -114,7 +114,7 @@ ExtraParamLength = 0;
OutputBuf = ExAllocatePoolWithTag(NonPagedPool, sizeof(ACPI_EVAL_OUTPUT_BUFFER) + - ExtraParamLength, 'IPCA'); + ExtraParamLength, 'BpcA'); if (!OutputBuf) return STATUS_INSUFFICIENT_RESOURCES;
OutputBuf->Signature = ACPI_EVAL_OUTPUT_BUFFER_SIGNATURE; @@ -150,12 +150,12 @@ RtlCopyMemory(Irp->AssociatedIrp.SystemBuffer, OutputBuf, sizeof(ACPI_EVAL_OUTPUT_BUFFER) + ExtraParamLength); Irp->IoStatus.Information = sizeof(ACPI_EVAL_OUTPUT_BUFFER) + ExtraParamLength; - ExFreePoolWithTag(OutputBuf, 'IPCA'); + ExFreePoolWithTag(OutputBuf, 'BpcA'); return STATUS_SUCCESS; } else { - ExFreePoolWithTag(OutputBuf, 'IPCA'); + ExFreePoolWithTag(OutputBuf, 'BpcA'); return STATUS_BUFFER_TOO_SMALL; } }
Modified: trunk/reactos/drivers/bus/acpi/main.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/main.c?rev... ============================================================================== --- trunk/reactos/drivers/bus/acpi/main.c [iso-8859-1] (original) +++ trunk/reactos/drivers/bus/acpi/main.c [iso-8859-1] Fri Mar 27 17:20:03 2015 @@ -123,8 +123,7 @@ goto End; }
- deviceName = ExAllocatePoolWithTag (NonPagedPool, - nameLength, 'IPCA'); + deviceName = ExAllocatePoolWithTag(NonPagedPool, nameLength, 'MpcA');
if (NULL == deviceName) { DPRINT1("AddDevice: no memory to alloc for deviceName(0x%x)\n", nameLength); @@ -160,7 +159,7 @@
End: if (deviceName){ - ExFreePoolWithTag(deviceName, 'IPCA'); + ExFreePoolWithTag(deviceName, 'MpcA'); } if (!NT_SUCCESS(status) && deviceObject){ if (deviceData && deviceData->NextLowerDriver){ @@ -376,7 +375,7 @@ BufferLength += FIELD_OFFSET(KEY_VALUE_PARTIAL_INFORMATION, Data);
/* Allocate memory for the value */ - ValueInfo = ExAllocatePoolWithTag(PagedPool, BufferLength, 'IPCA'); + ValueInfo = ExAllocatePoolWithTag(PagedPool, BufferLength, 'MpcA'); if (ValueInfo == NULL) return STATUS_NO_MEMORY; } @@ -436,7 +435,7 @@ /* Free the memory and return status */ if (ValueInfo != NULL) { - ExFreePoolWithTag(ValueInfo, 'IPCA'); + ExFreePoolWithTag(ValueInfo, 'MpcA'); }
return Status; @@ -487,7 +486,7 @@
/* Allocate a buffer large enough to be zero terminated */ Length += sizeof(UNICODE_NULL); - ProcessorIdentifier = ExAllocatePoolWithTag(PagedPool, Length, 'IPCA'); + ProcessorIdentifier = ExAllocatePoolWithTag(PagedPool, Length, 'IpcA'); if (ProcessorIdentifier == NULL) { DPRINT1("Failed to allocate 0x%lx bytes\n", Length); @@ -522,7 +521,7 @@
/* Allocate a buffer large enough to be zero terminated */ Length += sizeof(UNICODE_NULL); - ProcessorNameString = ExAllocatePoolWithTag(PagedPool, Length, 'IPCA'); + ProcessorNameString = ExAllocatePoolWithTag(PagedPool, Length, 'IpcA'); if (ProcessorNameString == NULL) { DPRINT1("Failed to allocate 0x%lx bytes\n", Length); @@ -557,7 +556,7 @@
/* Allocate a buffer large enough to be zero terminated */ Length += sizeof(UNICODE_NULL); - ProcessorVendorIdentifier = ExAllocatePoolWithTag(PagedPool, Length, 'IPCA'); + ProcessorVendorIdentifier = ExAllocatePoolWithTag(PagedPool, Length, 'IpcA'); if (ProcessorVendorIdentifier == NULL) { DPRINT1("Failed to allocate 0x%lx bytes\n", Length); @@ -617,7 +616,7 @@ 1) * sizeof(WCHAR);
/* Allocate a buffer to the data */ - HardwareIdsBuffer = ExAllocatePoolWithTag(PagedPool, HardwareIdsLength, 'IPCA'); + HardwareIdsBuffer = ExAllocatePoolWithTag(PagedPool, HardwareIdsLength, 'IpcA'); if (HardwareIdsBuffer == NULL) { Status = STATUS_INSUFFICIENT_RESOURCES; @@ -656,15 +655,15 @@ ZwClose(ProcessorHandle);
if (ProcessorIdentifier != NULL) - ExFreePoolWithTag(ProcessorIdentifier, 'IPCA'); + ExFreePoolWithTag(ProcessorIdentifier, 'IpcA');
if (ProcessorVendorIdentifier != NULL) - ExFreePoolWithTag(ProcessorVendorIdentifier, 'IPCA'); + ExFreePoolWithTag(ProcessorVendorIdentifier, 'IpcA');
if (!NT_SUCCESS(Status)) { if (HardwareIdsBuffer != NULL) - ExFreePoolWithTag(HardwareIdsBuffer, 'IPCA'); + ExFreePoolWithTag(HardwareIdsBuffer, 'IpcA'); }
return Status;
Modified: trunk/reactos/drivers/bus/acpi/osl.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/osl.c?rev=... ============================================================================== --- trunk/reactos/drivers/bus/acpi/osl.c [iso-8859-1] (original) +++ trunk/reactos/drivers/bus/acpi/osl.c [iso-8859-1] Fri Mar 27 17:20:03 2015 @@ -162,7 +162,7 @@ AcpiOsAllocate (ACPI_SIZE size) { DPRINT("AcpiOsAllocate size %d\n",size); - return ExAllocatePoolWithTag(NonPagedPool, size, 'IPCA'); + return ExAllocatePoolWithTag(NonPagedPool, size, 'ipcA'); }
void @@ -170,7 +170,7 @@ { if (!ptr) DPRINT1("Attempt to free null pointer!!!\n"); - ExFreePoolWithTag(ptr, 'IPCA'); + ExFreePoolWithTag(ptr, 'ipcA'); }
BOOLEAN @@ -281,7 +281,7 @@ return AE_BAD_PARAMETER; }
- Mutex = ExAllocatePool(NonPagedPool, sizeof(FAST_MUTEX)); + Mutex = ExAllocatePoolWithTag(NonPagedPool, sizeof(FAST_MUTEX), 'LpcA'); if (!Mutex) return AE_NO_MEMORY;
ExInitializeFastMutex(Mutex); @@ -301,7 +301,7 @@ return; }
- ExFreePool(Handle); + ExFreePoolWithTag(Handle, 'LpcA'); }
ACPI_STATUS @@ -364,7 +364,7 @@ return AE_BAD_PARAMETER; }
- Sem = ExAllocatePool(NonPagedPool, sizeof(ACPI_SEM)); + Sem = ExAllocatePoolWithTag(NonPagedPool, sizeof(ACPI_SEM), 'LpcA'); if (!Sem) return AE_NO_MEMORY;
Sem->CurrentUnits = InitialUnits; @@ -386,7 +386,7 @@ return AE_BAD_PARAMETER; }
- ExFreePool(Handle); + ExFreePoolWithTag(Handle, 'LpcA');
return AE_OK; } @@ -473,7 +473,7 @@ return AE_BAD_PARAMETER; }
- SpinLock = ExAllocatePool(NonPagedPool, sizeof(KSPIN_LOCK)); + SpinLock = ExAllocatePoolWithTag(NonPagedPool, sizeof(KSPIN_LOCK), 'LpcA'); if (!SpinLock) return AE_NO_MEMORY;
KeInitializeSpinLock(SpinLock); @@ -493,7 +493,7 @@ return; }
- ExFreePool(Handle); + ExFreePoolWithTag(Handle, 'LpcA'); }
ACPI_CPU_FLAGS
Modified: trunk/reactos/drivers/bus/acpi/pnp.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/pnp.c?rev=... ============================================================================== --- trunk/reactos/drivers/bus/acpi/pnp.c [iso-8859-1] (original) +++ trunk/reactos/drivers/bus/acpi/pnp.c [iso-8859-1] Fri Mar 27 17:20:03 2015 @@ -188,8 +188,7 @@ length = sizeof(DEVICE_RELATIONS) + (((numPdosPresent + prevcount) - 1) * sizeof (PDEVICE_OBJECT));
- relations = (PDEVICE_RELATIONS) ExAllocatePoolWithTag (PagedPool, - length, 'IPCA'); + relations = ExAllocatePoolWithTag(PagedPool, length, 'IpcA');
if (NULL == relations) { // @@ -237,7 +236,7 @@ // one. // if (oldRelations) { - ExFreePool (oldRelations); + ExFreePoolWithTag(oldRelations, 0); } Irp->IoStatus.Information = (ULONG_PTR) relations;
@@ -399,7 +398,7 @@ //
if (PdoData->HardwareIDs) { - ExFreePoolWithTag (PdoData->HardwareIDs, 'IPCA'); + ExFreePoolWithTag(PdoData->HardwareIDs, 'DpcA'); PdoData->HardwareIDs = NULL; }