summaryrefslogtreecommitdiffstats
path: root/sys/contrib/dev/acpica/utalloc.c
diff options
context:
space:
mode:
authormsmith <msmith@FreeBSD.org>2001-01-31 09:17:50 +0000
committermsmith <msmith@FreeBSD.org>2001-01-31 09:17:50 +0000
commit7948a3a80426e7bdc0728814e72cf46852c46576 (patch)
tree5ed7785feb928c9fe57c2d7175f89660521314a4 /sys/contrib/dev/acpica/utalloc.c
parent68d9171019852e7a4325965a2539a5a2eb7571da (diff)
downloadFreeBSD-src-7948a3a80426e7bdc0728814e72cf46852c46576.zip
FreeBSD-src-7948a3a80426e7bdc0728814e72cf46852c46576.tar.gz
Update to the 20010125 ACPI CA snapshot.
Diffstat (limited to 'sys/contrib/dev/acpica/utalloc.c')
-rw-r--r--sys/contrib/dev/acpica/utalloc.c38
1 files changed, 18 insertions, 20 deletions
diff --git a/sys/contrib/dev/acpica/utalloc.c b/sys/contrib/dev/acpica/utalloc.c
index d970e93..243ee21 100644
--- a/sys/contrib/dev/acpica/utalloc.c
+++ b/sys/contrib/dev/acpica/utalloc.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: cmalloc - local memory allocation routines
- * $Revision: 80 $
+ * $Revision: 84 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -126,7 +126,8 @@
MODULE_NAME ("cmalloc")
-#ifdef ACPI_DEBUG
+#ifdef ACPI_DEBUG_TRACK_ALLOCATIONS
+
/*
* Most of this code is for tracking memory leaks in the subsystem, and it
* gets compiled out when the ACPI_DEBUG flag is not set.
@@ -269,7 +270,8 @@ AcpiCmAddElementToAllocList (
Element = AcpiCmSearchAllocList (Address);
if (Element)
{
- REPORT_ERROR (("CmAddElementToAllocList: Address already present in list!\n"));
+ REPORT_ERROR (("CmAddElementToAllocList: Address already present in list! (%p)\n",
+ Address));
DEBUG_PRINT (ACPI_ERROR, ("Element %p Address %p\n", Element, Address));
@@ -613,11 +615,11 @@ AcpiCmDumpCurrentAllocations (
DEBUG_PRINT (TRACE_ALLOCATIONS | TRACE_TABLES,
("Total number of unfreed allocations = %d(%X)\n", i,i));
- return_VOID;
-}
-#endif /* Debug routines for memory leak detection */
+ return_VOID;
+}
+#endif /* #ifdef ACPI_DEBUG_TRACK_ALLOCATIONS */
/*****************************************************************************
*
@@ -642,8 +644,6 @@ _CmAllocate (
UINT32 Line)
{
void *Address = NULL;
- DEBUG_ONLY_MEMBERS (\
- ACPI_STATUS Status)
FUNCTION_TRACE_U32 ("_CmAllocate", Size);
@@ -669,10 +669,10 @@ _CmAllocate (
return_VALUE (NULL);
}
-#ifdef ACPI_DEBUG
- Status = AcpiCmAddElementToAllocList (Address, Size, MEM_MALLOC, Component,
- Module, Line);
- if (ACPI_FAILURE (Status))
+#ifdef ACPI_DEBUG_TRACK_ALLOCATIONS
+
+ if (ACPI_FAILURE (AcpiCmAddElementToAllocList (Address, Size, MEM_MALLOC,
+ Component, Module, Line)))
{
AcpiOsFree (Address);
return_PTR (NULL);
@@ -709,8 +709,6 @@ _CmCallocate (
UINT32 Line)
{
void *Address = NULL;
- DEBUG_ONLY_MEMBERS (\
- ACPI_STATUS Status)
FUNCTION_TRACE_U32 ("_CmCallocate", Size);
@@ -737,10 +735,10 @@ _CmCallocate (
return_VALUE (NULL);
}
-#ifdef ACPI_DEBUG
- Status = AcpiCmAddElementToAllocList (Address, Size, MEM_CALLOC, Component,
- Module, Line);
- if (ACPI_FAILURE (Status))
+#ifdef ACPI_DEBUG_TRACK_ALLOCATIONS
+
+ if (ACPI_FAILURE (AcpiCmAddElementToAllocList (Address, Size, MEM_CALLOC,
+ Component,Module, Line)))
{
AcpiOsFree (Address);
return_PTR (NULL);
@@ -787,7 +785,7 @@ _CmFree (
return_VOID;
}
-#ifdef ACPI_DEBUG
+#ifdef ACPI_DEBUG_TRACK_ALLOCATIONS
AcpiCmDeleteElementFromAllocList (Address, Component, Module, Line);
#endif
OpenPOWER on IntegriCloud