Author: rharabien Date: Thu May 26 22:22:37 2011 New Revision: 51943
URL: http://svn.reactos.org/svn/reactos?rev=51943&view=rev Log: [HAL] - Use ExFreePoolWithTag instead of ExFreePool - Add definitions of used tags
Modified: trunk/reactos/hal/halx86/generic/legacy/bus/bushndlr.c trunk/reactos/hal/halx86/generic/legacy/bus/pcibus.c trunk/reactos/hal/halx86/generic/legacy/bussupp.c trunk/reactos/hal/halx86/include/hal.h
Modified: trunk/reactos/hal/halx86/generic/legacy/bus/bushndlr.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/generic/legacy/b... ============================================================================== --- trunk/reactos/hal/halx86/generic/legacy/bus/bushndlr.c [iso-8859-1] (original) +++ trunk/reactos/hal/halx86/generic/legacy/bus/bushndlr.c [iso-8859-1] Thu May 26 22:22:37 2011 @@ -36,7 +36,7 @@ /* 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 @@ /* 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 @@ //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;
Modified: trunk/reactos/hal/halx86/generic/legacy/bus/pcibus.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/generic/legacy/b... ============================================================================== --- trunk/reactos/hal/halx86/generic/legacy/bus/pcibus.c [iso-8859-1] (original) +++ trunk/reactos/hal/halx86/generic/legacy/bus/pcibus.c [iso-8859-1] Thu May 26 22:22:37 2011 @@ -572,7 +572,7 @@ 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 @@ 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 @@ 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 @@ /* 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 @@ MaxPciBusNumber = PciRegistryInfo->NoBuses - 1;
/* Free the info structure */ - ExFreePool(PciRegistryInfo); + ExFreePoolWithTag(PciRegistryInfo, TAG_HAL); }
/* Initialize the PCI lock */
Modified: trunk/reactos/hal/halx86/generic/legacy/bussupp.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/generic/legacy/b... ============================================================================== --- trunk/reactos/hal/halx86/generic/legacy/bussupp.c [iso-8859-1] (original) +++ trunk/reactos/hal/halx86/generic/legacy/bussupp.c [iso-8859-1] Thu May 26 22:22:37 2011 @@ -1096,7 +1096,7 @@ 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 @@ 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; }
Modified: trunk/reactos/hal/halx86/include/hal.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/include/hal.h?re... ============================================================================== --- trunk/reactos/hal/halx86/include/hal.h [iso-8859-1] (original) +++ trunk/reactos/hal/halx86/include/hal.h [iso-8859-1] Thu May 26 22:22:37 2011 @@ -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"