mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 17:34:57 +00:00
[ACPI]
- Tag all ACPI pool allocations svn path=/trunk/; revision=53994
This commit is contained in:
parent
9b54e9dd69
commit
a772b034a6
10 changed files with 40 additions and 40 deletions
|
@ -94,7 +94,7 @@ Bus_PlugInDevice (
|
|||
index++;
|
||||
temp[++index] = UNICODE_NULL;
|
||||
|
||||
pdoData->HardwareIDs = ExAllocatePool(NonPagedPool, index*sizeof(WCHAR));
|
||||
pdoData->HardwareIDs = ExAllocatePoolWithTag(NonPagedPool, index*sizeof(WCHAR), 'IPCA');
|
||||
|
||||
|
||||
if (!pdoData->HardwareIDs) {
|
||||
|
|
|
@ -470,7 +470,7 @@ acpi_bus_generate_event_dpc(PKDPC Dpc,
|
|||
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 @@ acpi_bus_receive_event (
|
|||
|
||||
memcpy(event, entry, sizeof(struct acpi_bus_event));
|
||||
|
||||
ExFreePool(entry);
|
||||
ExFreePoolWithTag(entry, 'IPCA');
|
||||
return_VALUE(0);
|
||||
}
|
||||
|
||||
|
@ -1152,7 +1152,7 @@ acpi_bus_add (
|
|||
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 @@ acpi_bus_add (
|
|||
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 @@ acpi_bus_add (
|
|||
end:
|
||||
if (result) {
|
||||
if (device->pnp.cid_list) {
|
||||
ExFreePool(device->pnp.cid_list);
|
||||
ExFreePoolWithTag(device->pnp.cid_list, 'IPCA');
|
||||
}
|
||||
ExFreePool(device);
|
||||
ExFreePoolWithTag(device, 'IPCA');
|
||||
return_VALUE(result);
|
||||
}
|
||||
*child = device;
|
||||
|
@ -1460,10 +1460,10 @@ acpi_bus_remove (
|
|||
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);
|
||||
}
|
||||
|
|
|
@ -123,7 +123,7 @@ acpi_button_add (
|
|||
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 @@ acpi_button_add (
|
|||
if (!power_button)
|
||||
power_button = device;
|
||||
else {
|
||||
ExFreePool(button);
|
||||
ExFreePoolWithTag(button, 'IPCA');
|
||||
return_VALUE(-15);
|
||||
}
|
||||
break;
|
||||
|
@ -196,7 +196,7 @@ acpi_button_add (
|
|||
if (!sleep_button)
|
||||
sleep_button = device;
|
||||
else {
|
||||
ExFreePool(button);
|
||||
ExFreePoolWithTag(button, 'IPCA');
|
||||
return_VALUE(-15);
|
||||
}
|
||||
break;
|
||||
|
@ -204,7 +204,7 @@ acpi_button_add (
|
|||
if (!lid_button)
|
||||
lid_button = device;
|
||||
else {
|
||||
ExFreePool(button);
|
||||
ExFreePoolWithTag(button, 'IPCA');
|
||||
return_VALUE(-15);
|
||||
}
|
||||
break;
|
||||
|
@ -250,7 +250,7 @@ acpi_button_add (
|
|||
|
||||
end:
|
||||
if (result) {
|
||||
ExFreePool(button);
|
||||
ExFreePoolWithTag(button, 'IPCA');
|
||||
}
|
||||
|
||||
return_VALUE(result);
|
||||
|
@ -294,7 +294,7 @@ acpi_button_remove (struct acpi_device *device, int type)
|
|||
ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
|
||||
"Error removing notify handler\n"));
|
||||
|
||||
ExFreePool(button);
|
||||
ExFreePoolWithTag(button, 'IPCA');
|
||||
|
||||
return_VALUE(0);
|
||||
}
|
||||
|
|
|
@ -214,7 +214,7 @@ acpi_power_on (
|
|||
}
|
||||
|
||||
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 @@ acpi_power_add (
|
|||
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);
|
||||
|
||||
|
|
|
@ -78,7 +78,7 @@ acpi_system_add (
|
|||
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 @@ acpi_system_add (
|
|||
//#endif
|
||||
|
||||
if (result)
|
||||
ExFreePool(system);
|
||||
ExFreePoolWithTag(system, 'IPCA');
|
||||
|
||||
return_VALUE(result);
|
||||
}
|
||||
|
@ -146,7 +146,7 @@ acpi_system_remove (
|
|||
//#endif
|
||||
//
|
||||
//
|
||||
ExFreePool(system);
|
||||
ExFreePoolWithTag(system, 'IPCA');
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -693,7 +693,7 @@ Bus_PDO_QueryResources(
|
|||
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 @@ Bus_PDO_QueryResources(
|
|||
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 @@ Bus_PDO_QueryResources(
|
|||
|
||||
/* 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 @@ Bus_PDO_QueryResources(
|
|||
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 @@ Bus_PDO_QueryResourceRequirements(
|
|||
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 @@ Bus_PDO_QueryResourceRequirements(
|
|||
}
|
||||
|
||||
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 @@ Bus_PDO_QueryResourceRequirements(
|
|||
}
|
||||
resource = ACPI_NEXT_RESOURCE(resource);
|
||||
}
|
||||
ExFreePool(Buffer.Pointer);
|
||||
ExFreePoolWithTag(Buffer.Pointer, 'IPCA');
|
||||
|
||||
Irp->IoStatus.Information = (ULONG_PTR)RequirementsList;
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ Bus_PDO_EvalMethod(PPDO_DEVICE_DATA DeviceData,
|
|||
|
||||
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 @@ Bus_PDO_EvalMethod(PPDO_DEVICE_DATA DeviceData,
|
|||
|
||||
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 @@ Bus_PDO_EvalMethod(PPDO_DEVICE_DATA DeviceData,
|
|||
&RetBuff);
|
||||
|
||||
if (ParamList.Count != 0)
|
||||
ExFreePool(ParamList.Pointer);
|
||||
ExFreePoolWithTag(ParamList.Pointer, 'IPCA');
|
||||
|
||||
if (ACPI_SUCCESS(Status))
|
||||
{
|
||||
|
@ -126,8 +126,8 @@ Bus_PDO_EvalMethod(PPDO_DEVICE_DATA DeviceData,
|
|||
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 @@ Bus_PDO_EvalMethod(PPDO_DEVICE_DATA DeviceData,
|
|||
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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -163,7 +163,7 @@ Bus_AddDevice(
|
|||
|
||||
End:
|
||||
if (deviceName){
|
||||
ExFreePool(deviceName);
|
||||
ExFreePoolWithTag(deviceName, 'IPCA');
|
||||
}
|
||||
if (!NT_SUCCESS(status) && deviceObject){
|
||||
if (deviceData && deviceData->NextLowerDriver){
|
||||
|
|
|
@ -143,7 +143,7 @@ void *
|
|||
AcpiOsAllocate (ACPI_SIZE size)
|
||||
{
|
||||
DPRINT("AcpiOsAllocate size %d\n",size);
|
||||
return ExAllocatePool(NonPagedPool, size);
|
||||
return ExAllocatePoolWithTag(NonPagedPool, size, 'IPCA');
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -151,7 +151,7 @@ AcpiOsFree(void *ptr)
|
|||
{
|
||||
if (!ptr)
|
||||
DPRINT1("Attempt to free null pointer!!!\n");
|
||||
ExFreePool(ptr);
|
||||
ExFreePoolWithTag(ptr, 'IPCA');
|
||||
}
|
||||
|
||||
BOOLEAN
|
||||
|
|
|
@ -406,7 +406,7 @@ Bus_DestroyPdo (
|
|||
//
|
||||
|
||||
if (PdoData->HardwareIDs) {
|
||||
ExFreePool (PdoData->HardwareIDs);
|
||||
ExFreePoolWithTag (PdoData->HardwareIDs, 'IPCA');
|
||||
PdoData->HardwareIDs = NULL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue