- Use ExFreePoolWithTag instead of ExFreePool
- Add definitions of used tags

svn path=/trunk/; revision=51943
This commit is contained in:
Rafal Harabien 2011-05-26 22:22:37 +00:00
parent b24d89aee6
commit 6a2050afbe
4 changed files with 17 additions and 14 deletions

View file

@ -36,7 +36,7 @@ HalpAllocateArray(IN ULONG ArraySize)
/* Allocate the array */
Array = ExAllocatePoolWithTag(NonPagedPool,
Size,
'BusH');
TAG_BUS_HANDLER);
if (!Array) KeBugCheckEx(HAL_MEMORY_ALLOCATION, Size, 0, (ULONG_PTR)__FILE__, __LINE__);
/* Initialize it */
@ -263,7 +263,7 @@ HaliRegisterBusHandler(IN INTERFACE_TYPE InterfaceType,
/* Allocate the bus handler */
Bus = ExAllocatePoolWithTag(NonPagedPool,
sizeof(HAL_BUS_HANDLER) + ExtraData,
'HsuB');
TAG_BUS_HANDLER);
if (!Bus) return STATUS_INSUFFICIENT_RESOURCES;
/* Return the handler */
@ -404,11 +404,11 @@ HaliRegisterBusHandler(IN INTERFACE_TYPE InterfaceType,
//MmUnlockPagableImageSection(CodeHandle);
/* Free all allocations */
if (Bus) ExFreePool(Bus);
if (InterfaceArray) ExFreePool(InterfaceArray);
if (InterfaceBusNumberArray) ExFreePool(InterfaceBusNumberArray);
if (ConfigArray) ExFreePool(ConfigArray);
if (ConfigBusNumberArray) ExFreePool(ConfigBusNumberArray);
if (Bus) ExFreePoolWithTag(Bus, TAG_BUS_HANDLER);
if (InterfaceArray) ExFreePoolWithTag(InterfaceArray, TAG_BUS_HANDLER);
if (InterfaceBusNumberArray) ExFreePoolWithTag(InterfaceBusNumberArray, TAG_BUS_HANDLER);
if (ConfigArray) ExFreePoolWithTag(ConfigArray, TAG_BUS_HANDLER);
if (ConfigBusNumberArray) ExFreePoolWithTag(ConfigBusNumberArray, TAG_BUS_HANDLER);
/* And we're done */
return Status;

View file

@ -572,7 +572,7 @@ HalpGetISAFixedPCIIrq(IN PBUS_HANDLER BusHandler,
if (PciData.VendorID == PCI_INVALID_VENDORID) return STATUS_UNSUCCESSFUL;
/* Allocate the supported range structure */
*Range = ExAllocatePoolWithTag(PagedPool, sizeof(SUPPORTED_RANGE), 'Hal ');
*Range = ExAllocatePoolWithTag(PagedPool, sizeof(SUPPORTED_RANGE), TAG_HAL);
if (!*Range) return STATUS_INSUFFICIENT_RESOURCES;
/* Set it up */
@ -766,7 +766,7 @@ HalpAssignPCISlotResources(IN PBUS_HANDLER BusHandler,
PagedPool,
sizeof(CM_RESOURCE_LIST) +
(ResourceCount - 1) * sizeof(CM_PARTIAL_RESOURCE_DESCRIPTOR),
' laH');
TAG_HAL);
if (NULL == *AllocatedResources)
return STATUS_NO_MEMORY;
@ -1015,7 +1015,7 @@ HalpQueryPciRegistryInfo(VOID)
sizeof(PCI_REGISTRY_INFO_INTERNAL) +
(KeyInformation.Values *
sizeof(PCI_CARD_DESCRIPTOR)),
' laH');
TAG_HAL);
if (PciRegistryInfo)
{
/* Get the first card descriptor entry */
@ -1069,7 +1069,7 @@ HalpQueryPciRegistryInfo(VOID)
/* Just allocate the basic structure then */
PciRegistryInfo = ExAllocatePoolWithTag(NonPagedPool,
sizeof(PCI_REGISTRY_INFO_INTERNAL),
' laH');
TAG_HAL);
if (!PciRegistryInfo) return NULL;
}
@ -1119,7 +1119,7 @@ HalpInitializePciStubs(VOID)
MaxPciBusNumber = PciRegistryInfo->NoBuses - 1;
/* Free the info structure */
ExFreePool(PciRegistryInfo);
ExFreePoolWithTag(PciRegistryInfo, TAG_HAL);
}
/* Initialize the PCI lock */

View file

@ -1096,7 +1096,7 @@ HalpInitializePciBus(VOID)
HalpGetNMICrashFlag();
/* Free the registry data */
ExFreePool(PciRegistryInfo);
ExFreePoolWithTag(PciRegistryInfo, TAG_HAL);
/* Tell PnP if this hard supports correct decoding */
HalpMarkChipsetDecode(ExtendedAddressDecoding);
@ -1256,7 +1256,7 @@ HaliTranslateBusAddress(IN INTERFACE_TYPE InterfaceType,
Handler = HalReferenceHandlerForBus(InterfaceType, BusNumber);
if (!(Handler) || !(Handler->TranslateBusAddress))
{
DPRINT1("No translator!\n");
DPRINT1("No translator Interface: %x, Bus: %x, Handler: %x!\n", InterfaceType, BusNumber, Handler);
return FALSE;
}

View file

@ -45,6 +45,9 @@
#include "internal/i386/intrin_i.h"
#endif
#define TAG_HAL ' laH'
#define TAG_BUS_HANDLER 'BusH'
/* Internal HAL Headers */
#include "apic.h"
#include "bus.h"