uttrack.c (241973) | uttrack.c (243347) |
---|---|
1/****************************************************************************** 2 * 3 * Module Name: uttrack - Memory allocation tracking routines (debug only) 4 * 5 *****************************************************************************/ 6 7/* 8 * Copyright (C) 2000 - 2012, Intel Corp. --- 476 unchanged lines hidden (view full) --- 485 UINT32 Component, 486 const char *Module, 487 UINT32 Line) 488{ 489 ACPI_MEMORY_LIST *MemList; 490 ACPI_STATUS Status; 491 492 | 1/****************************************************************************** 2 * 3 * Module Name: uttrack - Memory allocation tracking routines (debug only) 4 * 5 *****************************************************************************/ 6 7/* 8 * Copyright (C) 2000 - 2012, Intel Corp. --- 476 unchanged lines hidden (view full) --- 485 UINT32 Component, 486 const char *Module, 487 UINT32 Line) 488{ 489 ACPI_MEMORY_LIST *MemList; 490 ACPI_STATUS Status; 491 492 |
493 ACPI_FUNCTION_TRACE (UtRemoveAllocation); | 493 ACPI_FUNCTION_NAME (UtRemoveAllocation); |
494 495 496 if (AcpiGbl_DisableMemTracking) 497 { | 494 495 496 if (AcpiGbl_DisableMemTracking) 497 { |
498 return_ACPI_STATUS (AE_OK); | 498 return (AE_OK); |
499 } 500 501 MemList = AcpiGbl_GlobalList; 502 if (NULL == MemList->ListHead) 503 { 504 /* No allocations! */ 505 506 ACPI_ERROR ((Module, Line, 507 "Empty allocation list, nothing to free!")); 508 | 499 } 500 501 MemList = AcpiGbl_GlobalList; 502 if (NULL == MemList->ListHead) 503 { 504 /* No allocations! */ 505 506 ACPI_ERROR ((Module, Line, 507 "Empty allocation list, nothing to free!")); 508 |
509 return_ACPI_STATUS (AE_OK); | 509 return (AE_OK); |
510 } 511 512 Status = AcpiUtAcquireMutex (ACPI_MTX_MEMORY); 513 if (ACPI_FAILURE (Status)) 514 { | 510 } 511 512 Status = AcpiUtAcquireMutex (ACPI_MTX_MEMORY); 513 if (ACPI_FAILURE (Status)) 514 { |
515 return_ACPI_STATUS (Status); | 515 return (Status); |
516 } 517 518 /* Unlink */ 519 520 if (Allocation->Previous) 521 { 522 (Allocation->Previous)->Next = Allocation->Next; 523 } 524 else 525 { 526 MemList->ListHead = Allocation->Next; 527 } 528 529 if (Allocation->Next) 530 { 531 (Allocation->Next)->Previous = Allocation->Previous; 532 } 533 | 516 } 517 518 /* Unlink */ 519 520 if (Allocation->Previous) 521 { 522 (Allocation->Previous)->Next = Allocation->Next; 523 } 524 else 525 { 526 MemList->ListHead = Allocation->Next; 527 } 528 529 if (Allocation->Next) 530 { 531 (Allocation->Next)->Previous = Allocation->Previous; 532 } 533 |
534 ACPI_DEBUG_PRINT ((ACPI_DB_ALLOCATIONS, "Freeing %p, size 0%X\n", 535 &Allocation->UserSpace, Allocation->Size)); 536 |
|
534 /* Mark the segment as deleted */ 535 536 ACPI_MEMSET (&Allocation->UserSpace, 0xEA, Allocation->Size); 537 | 537 /* Mark the segment as deleted */ 538 539 ACPI_MEMSET (&Allocation->UserSpace, 0xEA, Allocation->Size); 540 |
538 ACPI_DEBUG_PRINT ((ACPI_DB_ALLOCATIONS, "Freeing size 0%X\n", 539 Allocation->Size)); 540 | |
541 Status = AcpiUtReleaseMutex (ACPI_MTX_MEMORY); | 541 Status = AcpiUtReleaseMutex (ACPI_MTX_MEMORY); |
542 return_ACPI_STATUS (Status); | 542 return (Status); |
543} 544 545 546/******************************************************************************* 547 * 548 * FUNCTION: AcpiUtDumpAllocationInfo 549 * 550 * PARAMETERS: None --- 202 unchanged lines hidden --- | 543} 544 545 546/******************************************************************************* 547 * 548 * FUNCTION: AcpiUtDumpAllocationInfo 549 * 550 * PARAMETERS: None --- 202 unchanged lines hidden --- |