]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/acpi/utilities/utcache.c
Pull bugzilla-7200 into release branch
[linux-2.6-omap-h63xx.git] / drivers / acpi / utilities / utcache.c
index 56270a30718ae8b968430a527a20efc3b4087676..870f6edeb5f28c6529889912c316459dcb1ae44e 100644 (file)
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2007, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -162,7 +162,7 @@ acpi_status acpi_os_delete_cache(struct acpi_memory_list * cache)
 
        /* Now we can delete the cache object */
 
-       acpi_os_free(cache);
+       ACPI_FREE(cache);
        return (AE_OK);
 }
 
@@ -289,6 +289,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);