#include "pci.h"
+#ifndef NDEBUG
#define NDEBUG
+#endif
#include <debug.h>
/*** PRIVATE *****************************************************************/
Status = FdoLocateChildDevice(&Device, DeviceExtension, SlotNumber, &PciConfig);
if (!NT_SUCCESS(Status))
{
- Device = (PPCI_DEVICE)ExAllocatePool(NonPagedPool, sizeof(PCI_DEVICE));
+ Device = (PPCI_DEVICE)ExAllocatePoolWithTag(NonPagedPool, sizeof(PCI_DEVICE),TAG_PCI);
if (!Device)
{
/* FIXME: Cleanup resources for already discovered devices */
Size = sizeof(DEVICE_RELATIONS) + sizeof(Relations->Objects) *
(DeviceExtension->DeviceListCount - 1);
- Relations = (PDEVICE_RELATIONS)ExAllocatePool(PagedPool, Size);
+ Relations = (PDEVICE_RELATIONS)ExAllocatePoolWithTag(PagedPool, Size, TAG_PCI);
if (!Relations)
return STATUS_INSUFFICIENT_RESOURCES;
#define INITGUID
#include "pci.h"
+#ifndef NDEBUG
#define NDEBUG
+#endif
#include <debug.h>
Buffer[Index] = UNICODE_NULL;
- BufferU.Length = BufferU.MaximumLength = Index * sizeof(WCHAR);
+ BufferU.Length = BufferU.MaximumLength = (USHORT) Index * sizeof(WCHAR);
BufferU.Buffer = Buffer;
return RtlDuplicateUnicodeString(0, &BufferU, HardwareIDs);
Buffer[Index] = UNICODE_NULL;
- BufferU.Length = BufferU.MaximumLength = Index * sizeof(WCHAR);
+ BufferU.Length = BufferU.MaximumLength = (USHORT)Index * sizeof(WCHAR);
BufferU.Buffer = Buffer;
return RtlDuplicateUnicodeString(0, &BufferU, CompatibleIDs);
#include <ntifs.h>
#include <wdmguid.h>
#include <stdio.h>
+#include <ntddk.h>
+
+#ifdef _MSC_VER
+ #define STDCALL
+ #define DDKAPI
+#endif
+
+#define TAG(A, B, C, D) (ULONG)(((A)<<0) + ((B)<<8) + ((C)<<16) + ((D)<<24))
+#define TAG_PCI TAG('P', 'C', 'I', '0')
typedef struct _PCI_DEVICE
{
#include "pci.h"
+#ifndef NDEBUG
#define NDEBUG
+#endif
#include <debug.h>
/*** PRIVATE *****************************************************************/
DeviceExtension = (PPDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension;
FdoDeviceExtension = (PFDO_DEVICE_EXTENSION)DeviceExtension->Fdo->DeviceExtension;
- BusInformation = ExAllocatePool(PagedPool, sizeof(PNP_BUS_INFORMATION));
+ BusInformation = ExAllocatePoolWithTag(PagedPool, sizeof(PNP_BUS_INFORMATION), TAG_PCI);
Irp->IoStatus.Information = (ULONG_PTR)BusInformation;
if (BusInformation != NULL)
{
DPRINT("ListSize %lu (0x%lx)\n", ListSize, ListSize);
/* Allocate the resource requirements list */
- ResourceList = ExAllocatePool(PagedPool,
- ListSize);
+ ResourceList = ExAllocatePoolWithTag(PagedPool,
+ ListSize, TAG_PCI);
if (ResourceList == NULL)
{
Irp->IoStatus.Information = 0;
+ ResCount * sizeof(CM_PARTIAL_RESOURCE_DESCRIPTOR);
/* Allocate the resource list */
- ResourceList = ExAllocatePool(PagedPool,
- ListSize);
+ ResourceList = ExAllocatePoolWithTag(PagedPool,
+ ListSize, TAG_PCI);
if (ResourceList == NULL)
return STATUS_INSUFFICIENT_RESOURCES;