/* INCLUDES ******************************************************************/
-#include <ntddk.h>
+#include <wdm.h>
/* FUNCTIONS *****************************************************************/
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 */
index++;
temp[++index] = UNICODE_NULL;
- pdoData->HardwareIDs = ExAllocatePoolWithTag(NonPagedPool, index*sizeof(WCHAR), 'IPCA');
+ pdoData->HardwareIDs = ExAllocatePoolWithTag(NonPagedPool, index*sizeof(WCHAR), 'DpcA');
if (!pdoData->HardwareIDs) {
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;
memcpy(event, entry, sizeof(struct acpi_bus_event));
- ExFreePoolWithTag(entry, 'IPCA');
+ ExFreePoolWithTag(entry, 'epcA');
return_VALUE(0);
}
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);
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
}
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;
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;
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);
}
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;
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;
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;
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;
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;
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;
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;
/* 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;
resource = ACPI_NEXT_RESOURCE(resource);
}
- ExFreePoolWithTag(Buffer.Pointer, 'IPCA');
+ ExFreePoolWithTag(Buffer.Pointer, 'BpcA');
Irp->IoStatus.Information = (ULONG_PTR)ResourceList;
return STATUS_SUCCESS;
}
break;
}
- Buffer.Pointer = ExAllocatePoolWithTag(PagedPool, Buffer.Length, 'IPCA');
+ Buffer.Pointer = ExAllocatePoolWithTag(PagedPool, Buffer.Length, 'BpcA');
if (!Buffer.Pointer)
return STATUS_INSUFFICIENT_RESOURCES;
}
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;
}
resource = ACPI_NEXT_RESOURCE(resource);
}
- ExFreePoolWithTag(Buffer.Pointer, 'IPCA');
+ ExFreePoolWithTag(Buffer.Pointer, 'BpcA');
Irp->IoStatus.Information = (ULONG_PTR)RequirementsList;
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;
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;
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;
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;
&RetBuff);
if (ParamList.Count != 0)
- ExFreePoolWithTag(ParamList.Pointer, 'IPCA');
+ ExFreePoolWithTag(ParamList.Pointer, 'OpcA');
if (ACPI_SUCCESS(Status))
{
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;
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;
}
}
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);
End:
if (deviceName){
- ExFreePoolWithTag(deviceName, 'IPCA');
+ ExFreePoolWithTag(deviceName, 'MpcA');
}
if (!NT_SUCCESS(status) && deviceObject){
if (deviceData && deviceData->NextLowerDriver){
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;
}
/* Free the memory and return status */
if (ValueInfo != NULL)
{
- ExFreePoolWithTag(ValueInfo, 'IPCA');
+ ExFreePoolWithTag(ValueInfo, 'MpcA');
}
return Status;
/* 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);
/* 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);
/* 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);
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;
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;
AcpiOsAllocate (ACPI_SIZE size)
{
DPRINT("AcpiOsAllocate size %d\n",size);
- return ExAllocatePoolWithTag(NonPagedPool, size, 'IPCA');
+ return ExAllocatePoolWithTag(NonPagedPool, size, 'ipcA');
}
void
{
if (!ptr)
DPRINT1("Attempt to free null pointer!!!\n");
- ExFreePoolWithTag(ptr, 'IPCA');
+ ExFreePoolWithTag(ptr, 'ipcA');
}
BOOLEAN
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);
return;
}
- ExFreePool(Handle);
+ ExFreePoolWithTag(Handle, 'LpcA');
}
ACPI_STATUS
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;
return AE_BAD_PARAMETER;
}
- ExFreePool(Handle);
+ ExFreePoolWithTag(Handle, 'LpcA');
return AE_OK;
}
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);
return;
}
- ExFreePool(Handle);
+ ExFreePoolWithTag(Handle, 'LpcA');
}
ACPI_CPU_FLAGS
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) {
//
// one.
//
if (oldRelations) {
- ExFreePool (oldRelations);
+ ExFreePoolWithTag(oldRelations, 0);
}
Irp->IoStatus.Information = (ULONG_PTR) relations;
//
if (PdoData->HardwareIDs) {
- ExFreePoolWithTag (PdoData->HardwareIDs, 'IPCA');
+ ExFreePoolWithTag(PdoData->HardwareIDs, 'DpcA');
PdoData->HardwareIDs = NULL;
}