index++;
temp[++index] = UNICODE_NULL;
- pdoData->HardwareIDs = ExAllocatePool(NonPagedPool, index*sizeof(WCHAR));
+ pdoData->HardwareIDs = ExAllocatePoolWithTag(NonPagedPool, index*sizeof(WCHAR), 'IPCA');
if (!pdoData->HardwareIDs) {
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;
memcpy(event, entry, sizeof(struct acpi_bus_event));
- ExFreePool(entry);
+ ExFreePoolWithTag(entry, 'IPCA');
return_VALUE(0);
}
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);
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
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;
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);
}
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));
if (!power_button)
power_button = device;
else {
- ExFreePool(button);
+ ExFreePoolWithTag(button, 'IPCA');
return_VALUE(-15);
}
break;
if (!sleep_button)
sleep_button = device;
else {
- ExFreePool(button);
+ ExFreePoolWithTag(button, 'IPCA');
return_VALUE(-15);
}
break;
if (!lid_button)
lid_button = device;
else {
- ExFreePool(button);
+ ExFreePoolWithTag(button, 'IPCA');
return_VALUE(-15);
}
break;
end:
if (result) {
- ExFreePool(button);
+ ExFreePoolWithTag(button, 'IPCA');
}
return_VALUE(result);
ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
"Error removing notify handler\n"));
- ExFreePool(button);
+ ExFreePoolWithTag(button, 'IPCA');
return_VALUE(0);
}
}
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);
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);
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));
//#endif
if (result)
- ExFreePool(system);
+ ExFreePoolWithTag(system, 'IPCA');
return_VALUE(result);
}
//#endif
//
//
- ExFreePool(system);
+ ExFreePoolWithTag(system, 'IPCA');
return 0;
}
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;
return Irp->IoStatus.Status;
}
- Buffer.Pointer = ExAllocatePool(PagedPool, Buffer.Length);
+ Buffer.Pointer = ExAllocatePoolWithTag(PagedPool, Buffer.Length, 'IPCA');
if (!Buffer.Pointer)
return STATUS_INSUFFICIENT_RESOURCES;
/* 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;
resource = ACPI_NEXT_RESOURCE(resource);
}
- ExFreePool(Buffer.Pointer);
+ ExFreePoolWithTag(Buffer.Pointer, 'IPCA');
Irp->IoStatus.Information = (ULONG_PTR)ResourceList;
return STATUS_SUCCESS;
}
break;
}
- Buffer.Pointer = ExAllocatePool(PagedPool, Buffer.Length);
+ Buffer.Pointer = ExAllocatePoolWithTag(PagedPool, Buffer.Length, 'IPCA');
if (!Buffer.Pointer)
return STATUS_INSUFFICIENT_RESOURCES;
}
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;
}
resource = ACPI_NEXT_RESOURCE(resource);
}
- ExFreePool(Buffer.Pointer);
+ ExFreePoolWithTag(Buffer.Pointer, 'IPCA');
Irp->IoStatus.Information = (ULONG_PTR)RequirementsList;
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;
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;
&RetBuff);
if (ParamList.Count != 0)
- ExFreePool(ParamList.Pointer);
+ ExFreePoolWithTag(ParamList.Pointer, 'IPCA');
if (ACPI_SUCCESS(Status))
{
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;
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;
}
}
End:
if (deviceName){
- ExFreePool(deviceName);
+ ExFreePoolWithTag(deviceName, 'IPCA');
}
if (!NT_SUCCESS(status) && deviceObject){
if (deviceData && deviceData->NextLowerDriver){
AcpiOsAllocate (ACPI_SIZE size)
{
DPRINT("AcpiOsAllocate size %d\n",size);
- return ExAllocatePool(NonPagedPool, size);
+ return ExAllocatePoolWithTag(NonPagedPool, size, 'IPCA');
}
void
{
if (!ptr)
DPRINT1("Attempt to free null pointer!!!\n");
- ExFreePool(ptr);
+ ExFreePoolWithTag(ptr, 'IPCA');
}
BOOLEAN
//
if (PdoData->HardwareIDs) {
- ExFreePool (PdoData->HardwareIDs);
+ ExFreePoolWithTag (PdoData->HardwareIDs, 'IPCA');
PdoData->HardwareIDs = NULL;
}