diff options
Diffstat (limited to 'usr/src/uts/intel/io/acpica/utilities/utalloc.c')
| -rw-r--r-- | usr/src/uts/intel/io/acpica/utilities/utalloc.c | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/usr/src/uts/intel/io/acpica/utilities/utalloc.c b/usr/src/uts/intel/io/acpica/utilities/utalloc.c index 91dcfcfcec..49ee6bdaca 100644 --- a/usr/src/uts/intel/io/acpica/utilities/utalloc.c +++ b/usr/src/uts/intel/io/acpica/utilities/utalloc.c @@ -1,7 +1,7 @@ /****************************************************************************** * * Module Name: utalloc - local memory allocation routines - * $Revision: 1.162 $ + * $Revision: 1.166 $ * *****************************************************************************/ @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp. * All rights reserved. * * 2. License @@ -117,6 +117,7 @@ #define __UTALLOC_C__ #include "acpi.h" +#include "acdebug.h" #define _COMPONENT ACPI_UTILITIES ACPI_MODULE_NAME ("utalloc") @@ -218,6 +219,15 @@ ACPI_STATUS AcpiUtDeleteCaches ( void) { +#ifdef ACPI_DBG_TRACK_ALLOCATIONS + char Buffer[7]; + + if (AcpiGbl_DisplayFinalMemStats) + { + ACPI_STRCPY (Buffer, "MEMORY"); + (void) AcpiDbDisplayStatistics (Buffer); + } +#endif (void) AcpiOsDeleteCache (AcpiGbl_NamespaceCache); AcpiGbl_NamespaceCache = NULL; @@ -320,6 +330,13 @@ AcpiUtInitializeBuffer ( ACPI_STATUS Status = AE_OK; + /* Parameter validation */ + + if (!Buffer || !RequiredLength) + { + return (AE_BAD_PARAMETER); + } + switch (Buffer->Length) { case ACPI_NO_BUFFER: @@ -398,7 +415,7 @@ void * AcpiUtAllocate ( ACPI_SIZE Size, UINT32 Component, - char *Module, + const char *Module, UINT32 Line) { void *Allocation; @@ -450,7 +467,7 @@ void * AcpiUtAllocateZeroed ( ACPI_SIZE Size, UINT32 Component, - char *Module, + const char *Module, UINT32 Line) { void *Allocation; |
