Author: cgutman
Date: Tue Oct 4 21:49:13 2011
New Revision: 53994
URL:
http://svn.reactos.org/svn/reactos?rev=53994&view=rev
Log:
[ACPI]
- Tag all ACPI pool allocations
Modified:
trunk/reactos/drivers/bus/acpi/acpienum.c
trunk/reactos/drivers/bus/acpi/busmgr/bus.c
trunk/reactos/drivers/bus/acpi/busmgr/button.c
trunk/reactos/drivers/bus/acpi/busmgr/power.c
trunk/reactos/drivers/bus/acpi/busmgr/system.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/bus/acpi/acpienum.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpienum.…
==============================================================================
--- trunk/reactos/drivers/bus/acpi/acpienum.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/bus/acpi/acpienum.c [iso-8859-1] Tue Oct 4 21:49:13 2011
@@ -94,7 +94,7 @@
index++;
temp[++index] = UNICODE_NULL;
- pdoData->HardwareIDs = ExAllocatePool(NonPagedPool, index*sizeof(WCHAR));
+ pdoData->HardwareIDs = ExAllocatePoolWithTag(NonPagedPool, index*sizeof(WCHAR),
'IPCA');
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/bu…
==============================================================================
--- trunk/reactos/drivers/bus/acpi/busmgr/bus.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/bus/acpi/busmgr/bus.c [iso-8859-1] Tue Oct 4 21:49:13 2011
@@ -470,7 +470,7 @@
ULONG_PTR TypeData = (ULONG_PTR)SystemArgument2;
KIRQL OldIrql;
- event = ExAllocatePool(NonPagedPool,sizeof(struct acpi_bus_event));
+ event = ExAllocatePoolWithTag(NonPagedPool,sizeof(struct acpi_bus_event),
'IPCA');
if (!event)
return;
@@ -554,7 +554,7 @@
memcpy(event, entry, sizeof(struct acpi_bus_event));
- ExFreePool(entry);
+ ExFreePoolWithTag(entry, 'IPCA');
return_VALUE(0);
}
@@ -1152,7 +1152,7 @@
if (!child)
return_VALUE(AE_BAD_PARAMETER);
- device = ExAllocatePool(NonPagedPool,sizeof(struct acpi_device));
+ device = ExAllocatePoolWithTag(NonPagedPool,sizeof(struct acpi_device),
'IPCA');
if (!device) {
DPRINT1("Memory allocation error\n");
return_VALUE(-12);
@@ -1268,7 +1268,7 @@
uid = info->UniqueId.String;
if (info->Valid & ACPI_VALID_CID) {
cid_list = &info->CompatibleIdList;
- device->pnp.cid_list = ExAllocatePool(NonPagedPool,cid_list->ListSize);
+ device->pnp.cid_list = ExAllocatePoolWithTag(NonPagedPool,cid_list->ListSize,
'IPCA');
if (device->pnp.cid_list)
memcpy(device->pnp.cid_list, cid_list, cid_list->ListSize);
else
@@ -1437,9 +1437,9 @@
end:
if (result) {
if (device->pnp.cid_list) {
- ExFreePool(device->pnp.cid_list);
- }
- ExFreePool(device);
+ ExFreePoolWithTag(device->pnp.cid_list, 'IPCA');
+ }
+ ExFreePoolWithTag(device, 'IPCA');
return_VALUE(result);
}
*child = device;
@@ -1460,10 +1460,10 @@
acpi_device_unregister(device);
if (device && device->pnp.cid_list)
- ExFreePool(device->pnp.cid_list);
+ ExFreePoolWithTag(device->pnp.cid_list, 'IPCA');
if (device)
- ExFreePool(device);
+ ExFreePoolWithTag(device, 'IPCA');
return_VALUE(0);
}
Modified: trunk/reactos/drivers/bus/acpi/busmgr/button.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/busmgr/bu…
==============================================================================
--- trunk/reactos/drivers/bus/acpi/busmgr/button.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/bus/acpi/busmgr/button.c [iso-8859-1] Tue Oct 4 21:49:13 2011
@@ -123,7 +123,7 @@
if (!device)
return_VALUE(-1);
- button = ExAllocatePool(NonPagedPool,sizeof(struct acpi_button));
+ button = ExAllocatePoolWithTag(NonPagedPool,sizeof(struct acpi_button),
'IPCA');
if (!button)
return_VALUE(-4);
memset(button, 0, sizeof(struct acpi_button));
@@ -187,7 +187,7 @@
if (!power_button)
power_button = device;
else {
- ExFreePool(button);
+ ExFreePoolWithTag(button, 'IPCA');
return_VALUE(-15);
}
break;
@@ -196,7 +196,7 @@
if (!sleep_button)
sleep_button = device;
else {
- ExFreePool(button);
+ ExFreePoolWithTag(button, 'IPCA');
return_VALUE(-15);
}
break;
@@ -204,7 +204,7 @@
if (!lid_button)
lid_button = device;
else {
- ExFreePool(button);
+ ExFreePoolWithTag(button, 'IPCA');
return_VALUE(-15);
}
break;
@@ -250,7 +250,7 @@
end:
if (result) {
- ExFreePool(button);
+ ExFreePoolWithTag(button, 'IPCA');
}
return_VALUE(result);
@@ -294,7 +294,7 @@
ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
"Error removing notify handler\n"));
- ExFreePool(button);
+ ExFreePoolWithTag(button, 'IPCA');
return_VALUE(0);
}
Modified: trunk/reactos/drivers/bus/acpi/busmgr/power.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/busmgr/po…
==============================================================================
--- trunk/reactos/drivers/bus/acpi/busmgr/power.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/bus/acpi/busmgr/power.c [iso-8859-1] Tue Oct 4 21:49:13 2011
@@ -214,7 +214,7 @@
}
if (!found) {
- ref = ExAllocatePool(NonPagedPool,sizeof (struct acpi_power_reference));
+ ref = ExAllocatePoolWithTag(NonPagedPool,sizeof (struct
acpi_power_reference),'IPCA');
if (!ref) {
ACPI_DEBUG_PRINT((ACPI_DB_INFO, "kmalloc() failed\n"));
//mutex_unlock(&resource->resource_lock);
@@ -556,7 +556,7 @@
if (!device)
return_VALUE(-1);
- resource = ExAllocatePool(NonPagedPool,sizeof(struct acpi_power_resource));
+ resource = ExAllocatePoolWithTag(NonPagedPool,sizeof(struct
acpi_power_resource),'IPCA');
if (!resource)
return_VALUE(-4);
Modified: trunk/reactos/drivers/bus/acpi/busmgr/system.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/busmgr/sy…
==============================================================================
--- trunk/reactos/drivers/bus/acpi/busmgr/system.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/bus/acpi/busmgr/system.c [iso-8859-1] Tue Oct 4 21:49:13 2011
@@ -78,7 +78,7 @@
if (!device)
return_VALUE(-1);
- system = ExAllocatePool(NonPagedPool,sizeof(struct acpi_system));
+ system = ExAllocatePoolWithTag(NonPagedPool,sizeof(struct acpi_system),'IPCA');
if (!system)
return_VALUE(-14);
memset(system, 0, sizeof(struct acpi_system));
@@ -118,7 +118,7 @@
//#endif
if (result)
- ExFreePool(system);
+ ExFreePoolWithTag(system, 'IPCA');
return_VALUE(result);
}
@@ -146,7 +146,7 @@
//#endif
//
//
- ExFreePool(system);
+ ExFreePoolWithTag(system, 'IPCA');
return 0;
}
Modified: trunk/reactos/drivers/bus/acpi/buspdo.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/buspdo.c?…
==============================================================================
--- trunk/reactos/drivers/bus/acpi/buspdo.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/bus/acpi/buspdo.c [iso-8859-1] Tue Oct 4 21:49:13 2011
@@ -693,7 +693,7 @@
DPRINT1("Found PCI root hub: %d\n", BusNumber);
ResourceListSize = sizeof(CM_RESOURCE_LIST);
- ResourceList = (PCM_RESOURCE_LIST)ExAllocatePool(PagedPool, ResourceListSize);
+ ResourceList = (PCM_RESOURCE_LIST)ExAllocatePoolWithTag(PagedPool,
ResourceListSize, 'IPCA');
if (!ResourceList)
return STATUS_INSUFFICIENT_RESOURCES;
@@ -723,7 +723,7 @@
return Irp->IoStatus.Status;
}
- Buffer.Pointer = ExAllocatePool(PagedPool, Buffer.Length);
+ Buffer.Pointer = ExAllocatePoolWithTag(PagedPool, Buffer.Length, 'IPCA');
if (!Buffer.Pointer)
return STATUS_INSUFFICIENT_RESOURCES;
@@ -782,11 +782,11 @@
/* Allocate memory */
ResourceListSize = sizeof(CM_RESOURCE_LIST) + sizeof(CM_PARTIAL_RESOURCE_DESCRIPTOR) *
(NumberOfResources - 1);
- ResourceList = (PCM_RESOURCE_LIST)ExAllocatePool(PagedPool, ResourceListSize);
+ ResourceList = (PCM_RESOURCE_LIST)ExAllocatePoolWithTag(PagedPool, ResourceListSize,
'IPCA');
if (!ResourceList)
{
- ExFreePool(Buffer.Pointer);
+ ExFreePoolWithTag(Buffer.Pointer, 'IPCA');
return STATUS_INSUFFICIENT_RESOURCES;
}
ResourceList->Count = 1;
@@ -1110,7 +1110,7 @@
resource = ACPI_NEXT_RESOURCE(resource);
}
- ExFreePool(Buffer.Pointer);
+ ExFreePoolWithTag(Buffer.Pointer, 'IPCA');
Irp->IoStatus.Information = (ULONG_PTR)ResourceList;
return STATUS_SUCCESS;
}
@@ -1156,7 +1156,7 @@
break;
}
- Buffer.Pointer = ExAllocatePool(PagedPool, Buffer.Length);
+ Buffer.Pointer = ExAllocatePoolWithTag(PagedPool, Buffer.Length, 'IPCA');
if (!Buffer.Pointer)
return STATUS_INSUFFICIENT_RESOURCES;
@@ -1216,11 +1216,11 @@
}
RequirementsListSize = sizeof(IO_RESOURCE_REQUIREMENTS_LIST) +
sizeof(IO_RESOURCE_DESCRIPTOR) * (NumberOfResources - 1);
- RequirementsList = (PIO_RESOURCE_REQUIREMENTS_LIST)ExAllocatePool(PagedPool,
RequirementsListSize);
+ RequirementsList = (PIO_RESOURCE_REQUIREMENTS_LIST)ExAllocatePoolWithTag(PagedPool,
RequirementsListSize, 'IPCA');
if (!RequirementsList)
{
- ExFreePool(Buffer.Pointer);
+ ExFreePoolWithTag(Buffer.Pointer, 'IPCA');
return STATUS_INSUFFICIENT_RESOURCES;
}
RequirementsList->ListSize = RequirementsListSize;
@@ -1567,7 +1567,7 @@
}
resource = ACPI_NEXT_RESOURCE(resource);
}
- ExFreePool(Buffer.Pointer);
+ ExFreePoolWithTag(Buffer.Pointer, 'IPCA');
Irp->IoStatus.Information = (ULONG_PTR)RequirementsList;
Modified: trunk/reactos/drivers/bus/acpi/eval.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/eval.c?re…
==============================================================================
--- trunk/reactos/drivers/bus/acpi/eval.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/bus/acpi/eval.c [iso-8859-1] Tue Oct 4 21:49:13 2011
@@ -53,7 +53,7 @@
ParamList.Count = 1;
- ParamList.Pointer = ExAllocatePool(NonPagedPool, sizeof(ACPI_OBJECT));
+ ParamList.Pointer = ExAllocatePoolWithTag(NonPagedPool, sizeof(ACPI_OBJECT),
'IPCA');
if (!ParamList.Pointer) return STATUS_INSUFFICIENT_RESOURCES;
ParamList.Pointer[0].Type = ACPI_TYPE_INTEGER;
@@ -68,7 +68,7 @@
ParamList.Count = 1;
- ParamList.Pointer = ExAllocatePool(NonPagedPool, sizeof(ACPI_OBJECT));
+ ParamList.Pointer = ExAllocatePoolWithTag(NonPagedPool, sizeof(ACPI_OBJECT),
'IPCA');
if (!ParamList.Pointer) return STATUS_INSUFFICIENT_RESOURCES;
ParamList.Pointer[0].String.Pointer = (CHAR*)SimpleStr->String;
@@ -86,7 +86,7 @@
&RetBuff);
if (ParamList.Count != 0)
- ExFreePool(ParamList.Pointer);
+ ExFreePoolWithTag(ParamList.Pointer, 'IPCA');
if (ACPI_SUCCESS(Status))
{
@@ -126,8 +126,8 @@
else
ExtraParamLength = 0;
- OutputBuf = ExAllocatePool(NonPagedPool, sizeof(ACPI_EVAL_OUTPUT_BUFFER) +
- ExtraParamLength);
+ OutputBuf = ExAllocatePoolWithTag(NonPagedPool, sizeof(ACPI_EVAL_OUTPUT_BUFFER) +
+ ExtraParamLength, 'IPCA');
if (!OutputBuf) return STATUS_INSUFFICIENT_RESOURCES;
OutputBuf->Signature = ACPI_EVAL_OUTPUT_BUFFER_SIGNATURE;
@@ -163,12 +163,12 @@
RtlCopyMemory(Irp->AssociatedIrp.SystemBuffer, OutputBuf,
sizeof(ACPI_EVAL_OUTPUT_BUFFER) +
ExtraParamLength);
Irp->IoStatus.Information = sizeof(ACPI_EVAL_OUTPUT_BUFFER) +
ExtraParamLength;
- ExFreePool(OutputBuf);
+ ExFreePoolWithTag(OutputBuf, 'IPCA');
return STATUS_SUCCESS;
}
else
{
- ExFreePool(OutputBuf);
+ ExFreePoolWithTag(OutputBuf, 'IPCA');
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?re…
==============================================================================
--- trunk/reactos/drivers/bus/acpi/main.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/bus/acpi/main.c [iso-8859-1] Tue Oct 4 21:49:13 2011
@@ -163,7 +163,7 @@
End:
if (deviceName){
- ExFreePool(deviceName);
+ ExFreePoolWithTag(deviceName, 'IPCA');
}
if (!NT_SUCCESS(status) && deviceObject){
if (deviceData && deviceData->NextLowerDriver){
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] Tue Oct 4 21:49:13 2011
@@ -143,7 +143,7 @@
AcpiOsAllocate (ACPI_SIZE size)
{
DPRINT("AcpiOsAllocate size %d\n",size);
- return ExAllocatePool(NonPagedPool, size);
+ return ExAllocatePoolWithTag(NonPagedPool, size, 'IPCA');
}
void
@@ -151,7 +151,7 @@
{
if (!ptr)
DPRINT1("Attempt to free null pointer!!!\n");
- ExFreePool(ptr);
+ ExFreePoolWithTag(ptr, 'IPCA');
}
BOOLEAN
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] Tue Oct 4 21:49:13 2011
@@ -406,7 +406,7 @@
//
if (PdoData->HardwareIDs) {
- ExFreePool (PdoData->HardwareIDs);
+ ExFreePoolWithTag (PdoData->HardwareIDs, 'IPCA');
PdoData->HardwareIDs = NULL;
}