diff options
Diffstat (limited to 'drivers/acpi/utilities/utcache.c')
-rw-r--r-- | drivers/acpi/utilities/utcache.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/acpi/utilities/utcache.c b/drivers/acpi/utilities/utcache.c index 1a1f8109159c..870f6edeb5f2 100644 --- a/drivers/acpi/utilities/utcache.c +++ b/drivers/acpi/utilities/utcache.c | |||
@@ -5,7 +5,7 @@ | |||
5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Copyright (C) 2000 - 2006, R. Byron Moore | 8 | * Copyright (C) 2000 - 2007, R. Byron Moore |
9 | * All rights reserved. | 9 | * All rights reserved. |
10 | * | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
@@ -289,6 +289,14 @@ void *acpi_os_acquire_object(struct acpi_memory_list *cache) | |||
289 | 289 | ||
290 | ACPI_MEM_TRACKING(cache->total_allocated++); | 290 | ACPI_MEM_TRACKING(cache->total_allocated++); |
291 | 291 | ||
292 | #ifdef ACPI_DBG_TRACK_ALLOCATIONS | ||
293 | if ((cache->total_allocated - cache->total_freed) > | ||
294 | cache->max_occupied) { | ||
295 | cache->max_occupied = | ||
296 | cache->total_allocated - cache->total_freed; | ||
297 | } | ||
298 | #endif | ||
299 | |||
292 | /* Avoid deadlock with ACPI_ALLOCATE_ZEROED */ | 300 | /* Avoid deadlock with ACPI_ALLOCATE_ZEROED */ |
293 | 301 | ||
294 | status = acpi_ut_release_mutex(ACPI_MTX_CACHES); | 302 | status = acpi_ut_release_mutex(ACPI_MTX_CACHES); |