]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/acpi/utilities/utcache.c
Merge branch 'for-2.6.27' of git://linux-nfs.org/~bfields/linux
[linux-2.6-omap-h63xx.git] / drivers / acpi / utilities / utcache.c
index 1a1f8109159cec3d9d988d1513a75cdb1638ecf4..245fa80cf60004da09db0195fc02ac748d9412a7 100644 (file)
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2008, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -45,7 +45,6 @@
 
 #define _COMPONENT          ACPI_UTILITIES
 ACPI_MODULE_NAME("utcache")
-
 #ifdef ACPI_USE_LOCAL_CACHE
 /*******************************************************************************
  *
@@ -64,7 +63,7 @@ ACPI_MODULE_NAME("utcache")
 acpi_status
 acpi_os_create_cache(char *cache_name,
                     u16 object_size,
-                    u16 max_depth, struct acpi_memory_list **return_cache)
+                    u16 max_depth, struct acpi_memory_list ** return_cache)
 {
        struct acpi_memory_list *cache;
 
@@ -289,6 +288,14 @@ void *acpi_os_acquire_object(struct acpi_memory_list *cache)
 
                ACPI_MEM_TRACKING(cache->total_allocated++);
 
+#ifdef ACPI_DBG_TRACK_ALLOCATIONS
+               if ((cache->total_allocated - cache->total_freed) >
+                   cache->max_occupied) {
+                       cache->max_occupied =
+                           cache->total_allocated - cache->total_freed;
+               }
+#endif
+
                /* Avoid deadlock with ACPI_ALLOCATE_ZEROED */
 
                status = acpi_ut_release_mutex(ACPI_MTX_CACHES);