diff options
Diffstat (limited to 'drivers/acpi/namespace/nsalloc.c')
-rw-r--r-- | drivers/acpi/namespace/nsalloc.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/acpi/namespace/nsalloc.c b/drivers/acpi/namespace/nsalloc.c index 55b407aae266..1e6a1b02dfd7 100644 --- a/drivers/acpi/namespace/nsalloc.c +++ b/drivers/acpi/namespace/nsalloc.c | |||
@@ -61,6 +61,9 @@ ACPI_MODULE_NAME("nsalloc") | |||
61 | struct acpi_namespace_node *acpi_ns_create_node(u32 name) | 61 | struct acpi_namespace_node *acpi_ns_create_node(u32 name) |
62 | { | 62 | { |
63 | struct acpi_namespace_node *node; | 63 | struct acpi_namespace_node *node; |
64 | #ifdef ACPI_DBG_TRACK_ALLOCATIONS | ||
65 | u32 temp; | ||
66 | #endif | ||
64 | 67 | ||
65 | ACPI_FUNCTION_TRACE(ns_create_node); | 68 | ACPI_FUNCTION_TRACE(ns_create_node); |
66 | 69 | ||
@@ -71,6 +74,15 @@ struct acpi_namespace_node *acpi_ns_create_node(u32 name) | |||
71 | 74 | ||
72 | ACPI_MEM_TRACKING(acpi_gbl_ns_node_list->total_allocated++); | 75 | ACPI_MEM_TRACKING(acpi_gbl_ns_node_list->total_allocated++); |
73 | 76 | ||
77 | #ifdef ACPI_DBG_TRACK_ALLOCATIONS | ||
78 | temp = | ||
79 | acpi_gbl_ns_node_list->total_allocated - | ||
80 | acpi_gbl_ns_node_list->total_freed; | ||
81 | if (temp > acpi_gbl_ns_node_list->max_occupied) { | ||
82 | acpi_gbl_ns_node_list->max_occupied = temp; | ||
83 | } | ||
84 | #endif | ||
85 | |||
74 | node->name.integer = name; | 86 | node->name.integer = name; |
75 | ACPI_SET_DESCRIPTOR_TYPE(node, ACPI_DESC_TYPE_NAMED); | 87 | ACPI_SET_DESCRIPTOR_TYPE(node, ACPI_DESC_TYPE_NAMED); |
76 | return_PTR(node); | 88 | return_PTR(node); |