diff options
author | Bob Moore <robert.moore@intel.com> | 2007-02-02 19:48:23 +0300 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2007-02-02 21:14:31 -0500 |
commit | d41eb99bac4063aa3fac2dbb8ca01bedd9f0b3bf (patch) | |
tree | 471d1c7519e76307e6667588e2aa3d8ba3875cc3 /drivers/acpi/utilities | |
parent | afbb9e659d584bd5bf0604848c91afd5761ed7a1 (diff) |
ACPICA: Added option to display memory statistics upon termination.
Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/utilities')
-rw-r--r-- | drivers/acpi/utilities/utalloc.c | 9 | ||||
-rw-r--r-- | drivers/acpi/utilities/utglobal.c | 4 |
2 files changed, 13 insertions, 0 deletions
diff --git a/drivers/acpi/utilities/utalloc.c b/drivers/acpi/utilities/utalloc.c index f6cbc0b1bfd..b716797e6fc 100644 --- a/drivers/acpi/utilities/utalloc.c +++ b/drivers/acpi/utilities/utalloc.c @@ -42,6 +42,7 @@ */ #include <acpi/acpi.h> +#include <acpi/acdebug.h> #define _COMPONENT ACPI_UTILITIES ACPI_MODULE_NAME("utalloc") @@ -142,6 +143,14 @@ acpi_status acpi_ut_create_caches(void) acpi_status acpi_ut_delete_caches(void) { +#ifdef ACPI_DBG_TRACK_ALLOCATIONS + char buffer[7]; + + if (acpi_gbl_display_final_mem_stats) { + ACPI_STRCPY(buffer, "MEMORY"); + acpi_db_display_statistics(buffer); + } +#endif (void)acpi_os_delete_cache(acpi_gbl_namespace_cache); acpi_gbl_namespace_cache = NULL; diff --git a/drivers/acpi/utilities/utglobal.c b/drivers/acpi/utilities/utglobal.c index 509a85d6b01..62929f4206b 100644 --- a/drivers/acpi/utilities/utglobal.c +++ b/drivers/acpi/utilities/utglobal.c @@ -727,6 +727,10 @@ void acpi_ut_init_globals(void) acpi_gbl_lowest_stack_pointer = ACPI_SIZE_MAX; #endif +#ifdef ACPI_DBG_TRACK_ALLOCATIONS + acpi_gbl_display_final_mem_stats = FALSE; +#endif + return_VOID; } |