nsalloc.c (80062) | nsalloc.c (82367) |
---|---|
1/******************************************************************************* 2 * 3 * Module Name: nsalloc - Namespace allocation and deletion utilities | 1/******************************************************************************* 2 * 3 * Module Name: nsalloc - Namespace allocation and deletion utilities |
4 * $Revision: 51 $ | 4 * $Revision: 53 $ |
5 * 6 ******************************************************************************/ 7 8/****************************************************************************** 9 * 10 * 1. Copyright Notice 11 * 12 * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp. --- 135 unchanged lines hidden (view full) --- 148 149 150 Node = ACPI_MEM_CALLOCATE (sizeof (ACPI_NAMESPACE_NODE)); 151 if (!Node) 152 { 153 return_PTR (NULL); 154 } 155 | 5 * 6 ******************************************************************************/ 7 8/****************************************************************************** 9 * 10 * 1. Copyright Notice 11 * 12 * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp. --- 135 unchanged lines hidden (view full) --- 148 149 150 Node = ACPI_MEM_CALLOCATE (sizeof (ACPI_NAMESPACE_NODE)); 151 if (!Node) 152 { 153 return_PTR (NULL); 154 } 155 |
156 INCREMENT_NAME_TABLE_METRICS (sizeof (ACPI_NAMESPACE_NODE)); | 156 ACPI_MEM_TRACKING (AcpiGbl_MemoryLists[ACPI_MEM_LIST_NSNODE].TotalAllocated++); |
157 158 Node->DataType = ACPI_DESC_TYPE_NAMED; 159 Node->Name = AcpiName; 160 Node->ReferenceCount = 1; 161 162 return_PTR (Node); 163} 164 --- 41 unchanged lines hidden (view full) --- 206 } 207 } 208 else 209 { 210 ParentNode->Child = NextNode->Peer; 211 } 212 213 | 157 158 Node->DataType = ACPI_DESC_TYPE_NAMED; 159 Node->Name = AcpiName; 160 Node->ReferenceCount = 1; 161 162 return_PTR (Node); 163} 164 --- 41 unchanged lines hidden (view full) --- 206 } 207 } 208 else 209 { 210 ParentNode->Child = NextNode->Peer; 211 } 212 213 |
214 DECREMENT_NAME_TABLE_METRICS (sizeof (ACPI_NAMESPACE_NODE)); | 214 ACPI_MEM_TRACKING (AcpiGbl_MemoryLists[ACPI_MEM_LIST_NSNODE].TotalFreed++); |
215 216 /* 217 * Detach an object if there is one 218 */ 219 220 if (Node->Object) 221 { 222 AcpiNsDetachObject (Node); --- 84 unchanged lines hidden (view full) --- 307 (INTERNAL_TYPE_FIELD_DEFN == Type) || 308 (INTERNAL_TYPE_BANK_FIELD_DEFN == Type)) 309 { 310 /* 311 * We don't want to abort here, however! 312 * We will fill in the actual type when the 313 * real definition is found later. 314 */ | 215 216 /* 217 * Detach an object if there is one 218 */ 219 220 if (Node->Object) 221 { 222 AcpiNsDetachObject (Node); --- 84 unchanged lines hidden (view full) --- 307 (INTERNAL_TYPE_FIELD_DEFN == Type) || 308 (INTERNAL_TYPE_BANK_FIELD_DEFN == Type)) 309 { 310 /* 311 * We don't want to abort here, however! 312 * We will fill in the actual type when the 313 * real definition is found later. 314 */ |
315 DEBUG_PRINTP (ACPI_INFO, ("[%4.4s] is a forward reference\n", | 315 ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "[%4.4s] is a forward reference\n", |
316 &Node->Name)); 317 } 318 319 /* 320 * The DefFieldDefn and BankFieldDefn cases are actually 321 * looking up the Region in which the field will be defined 322 */ 323 if ((INTERNAL_TYPE_FIELD_DEFN == Type) || --- 10 unchanged lines hidden (view full) --- 334 */ 335 if ((Type != INTERNAL_TYPE_SCOPE) && 336 (Type != INTERNAL_TYPE_DEF_ANY) && 337 (Type != INTERNAL_TYPE_INDEX_FIELD_DEFN)) 338 { 339 Node->Type = (UINT8) Type; 340 } 341 | 316 &Node->Name)); 317 } 318 319 /* 320 * The DefFieldDefn and BankFieldDefn cases are actually 321 * looking up the Region in which the field will be defined 322 */ 323 if ((INTERNAL_TYPE_FIELD_DEFN == Type) || --- 10 unchanged lines hidden (view full) --- 334 */ 335 if ((Type != INTERNAL_TYPE_SCOPE) && 336 (Type != INTERNAL_TYPE_DEF_ANY) && 337 (Type != INTERNAL_TYPE_INDEX_FIELD_DEFN)) 338 { 339 Node->Type = (UINT8) Type; 340 } 341 |
342 DEBUG_PRINTP (TRACE_NAMES, ("%4.4s added to %p at %p\n", | 342 ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, "%4.4s added to %p at %p\n", |
343 &Node->Name, ParentNode, Node)); 344 345 /* 346 * Increment the reference count(s) of all parents up to 347 * the root! 348 */ 349 while ((Node = AcpiNsGetParentObject (Node)) != NULL) 350 { --- 51 unchanged lines hidden (view full) --- 402 403 NextNode = ChildNode->Peer; 404 Flags = ChildNode->Flags; 405 406 /* Grandchildren should have all been deleted already */ 407 408 if (ChildNode->Child) 409 { | 343 &Node->Name, ParentNode, Node)); 344 345 /* 346 * Increment the reference count(s) of all parents up to 347 * the root! 348 */ 349 while ((Node = AcpiNsGetParentObject (Node)) != NULL) 350 { --- 51 unchanged lines hidden (view full) --- 402 403 NextNode = ChildNode->Peer; 404 Flags = ChildNode->Flags; 405 406 /* Grandchildren should have all been deleted already */ 407 408 if (ChildNode->Child) 409 { |
410 DEBUG_PRINTP (ACPI_ERROR, ("Found a grandchild! P=%X C=%X\n", | 410 ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Found a grandchild! P=%X C=%X\n", |
411 ParentNode, ChildNode)); 412 } 413 414 /* Now we can free this child object */ 415 | 411 ParentNode, ChildNode)); 412 } 413 414 /* Now we can free this child object */ 415 |
416 DECREMENT_NAME_TABLE_METRICS (sizeof (ACPI_NAMESPACE_NODE)); | 416 ACPI_MEM_TRACKING (AcpiGbl_MemoryLists[ACPI_MEM_LIST_NSNODE].TotalFreed++); |
417 | 417 |
418 DEBUG_PRINTP (ACPI_INFO, ("Object %p, Remaining %X\n", | 418 ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Object %p, Remaining %X\n", |
419 ChildNode, AcpiGbl_CurrentNodeCount)); 420 421 /* 422 * Detach an object if there is one 423 */ 424 425 if (ChildNode->Object) 426 { --- 290 unchanged lines hidden --- | 419 ChildNode, AcpiGbl_CurrentNodeCount)); 420 421 /* 422 * Detach an object if there is one 423 */ 424 425 if (ChildNode->Object) 426 { --- 290 unchanged lines hidden --- |