Lines Matching +full:line +full:- +full:orders
3 * Module Name: uttrack - Memory allocation tracking routines (debug only)
11 * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
28 * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
104 * re-exports any such software from a foreign destination, Licensee shall
105 * ensure that the distribution and export/re-export of the software is in
106 * compliance with all laws, regulations, orders, or other restrictions of the
108 * any of its subsidiaries will export/re-export any technical data, process,
130 * 3. Neither the names of the above-listed copyright holders nor the names
158 * line number. AcpiUtAllocate and AcpiUtAllocateZeroed call
185 UINT32 Line);
192 UINT32 Line);
199 * PARAMETERS: CacheName - Ascii name for the cache
200 * ObjectSize - Size of each cached object
201 * ReturnCache - Where the new cache object is returned
224 Cache->ListName = ListName; in AcpiUtCreateList()
225 Cache->ObjectSize = ObjectSize; in AcpiUtCreateList()
236 * PARAMETERS: Size - Size of the allocation
237 * Component - Component type of caller
238 * Module - Source file name of caller
239 * Line - Line number of caller
252 UINT32 Line) in AcpiUtAllocateAndTrack() argument
262 ACPI_WARNING ((Module, Line, in AcpiUtAllocateAndTrack()
272 ACPI_WARNING ((Module, Line, in AcpiUtAllocateAndTrack()
279 Allocation, Size, ACPI_MEM_MALLOC, Component, Module, Line); in AcpiUtAllocateAndTrack()
286 AcpiGbl_GlobalList->TotalAllocated++; in AcpiUtAllocateAndTrack()
287 AcpiGbl_GlobalList->TotalSize += (UINT32) Size; in AcpiUtAllocateAndTrack()
288 AcpiGbl_GlobalList->CurrentTotalSize += (UINT32) Size; in AcpiUtAllocateAndTrack()
290 if (AcpiGbl_GlobalList->CurrentTotalSize > in AcpiUtAllocateAndTrack()
291 AcpiGbl_GlobalList->MaxOccupied) in AcpiUtAllocateAndTrack()
293 AcpiGbl_GlobalList->MaxOccupied = in AcpiUtAllocateAndTrack()
294 AcpiGbl_GlobalList->CurrentTotalSize; in AcpiUtAllocateAndTrack()
297 return ((void *) &Allocation->UserSpace); in AcpiUtAllocateAndTrack()
305 * PARAMETERS: Size - Size of the allocation
306 * Component - Component type of caller
307 * Module - Source file name of caller
308 * Line - Line number of caller
321 UINT32 Line) in AcpiUtAllocateZeroedAndTrack() argument
331 ACPI_WARNING ((Module, Line, in AcpiUtAllocateZeroedAndTrack()
342 ACPI_ERROR ((Module, Line, in AcpiUtAllocateZeroedAndTrack()
348 ACPI_MEM_CALLOC, Component, Module, Line); in AcpiUtAllocateZeroedAndTrack()
355 AcpiGbl_GlobalList->TotalAllocated++; in AcpiUtAllocateZeroedAndTrack()
356 AcpiGbl_GlobalList->TotalSize += (UINT32) Size; in AcpiUtAllocateZeroedAndTrack()
357 AcpiGbl_GlobalList->CurrentTotalSize += (UINT32) Size; in AcpiUtAllocateZeroedAndTrack()
359 if (AcpiGbl_GlobalList->CurrentTotalSize > in AcpiUtAllocateZeroedAndTrack()
360 AcpiGbl_GlobalList->MaxOccupied) in AcpiUtAllocateZeroedAndTrack()
362 AcpiGbl_GlobalList->MaxOccupied = in AcpiUtAllocateZeroedAndTrack()
363 AcpiGbl_GlobalList->CurrentTotalSize; in AcpiUtAllocateZeroedAndTrack()
366 return ((void *) &Allocation->UserSpace); in AcpiUtAllocateZeroedAndTrack()
374 * PARAMETERS: Allocation - Address of the memory to deallocate
375 * Component - Component type of caller
376 * Module - Source file name of caller
377 * Line - Line number of caller
390 UINT32 Line) in AcpiUtFreeAndTrack() argument
401 ACPI_ERROR ((Module, Line, in AcpiUtFreeAndTrack()
408 (((char *) Allocation) - sizeof (ACPI_DEBUG_MEM_HEADER))); in AcpiUtFreeAndTrack()
410 AcpiGbl_GlobalList->TotalFreed++; in AcpiUtFreeAndTrack()
411 AcpiGbl_GlobalList->CurrentTotalSize -= DebugBlock->Size; in AcpiUtFreeAndTrack()
413 Status = AcpiUtRemoveAllocation (DebugBlock, Component, Module, Line); in AcpiUtFreeAndTrack()
430 * PARAMETERS: Allocation - Address of allocated memory
442 * Note: The list is ordered by larger-to-smaller addresses.
460 Element = AcpiGbl_GlobalList->ListHead; in AcpiUtFindAllocation()
469 * Note: List is ordered by larger-to-smaller addresses, on the in AcpiUtFindAllocation()
475 /* Check for end-of-list */ in AcpiUtFindAllocation()
477 if (!Element->Next) in AcpiUtFindAllocation()
482 Element = Element->Next; in AcpiUtFindAllocation()
490 return (Element->Previous); in AcpiUtFindAllocation()
498 * PARAMETERS: Allocation - Address of allocated memory
499 * Size - Size of the allocation
500 * AllocType - MEM_MALLOC or MEM_CALLOC
501 * Component - Component type of caller
502 * Module - Source file name of caller
503 * Line - Line number of caller
518 UINT32 Line) in AcpiUtTrackAllocation() argument
555 Allocation->Size = (UINT32) Size; in AcpiUtTrackAllocation()
556 Allocation->AllocType = AllocType; in AcpiUtTrackAllocation()
557 Allocation->Component = Component; in AcpiUtTrackAllocation()
558 Allocation->Line = Line; in AcpiUtTrackAllocation()
560 AcpiUtSafeStrncpy (Allocation->Module, (char *) Module, ACPI_MAX_MODULE_NAME); in AcpiUtTrackAllocation()
566 if (MemList->ListHead) in AcpiUtTrackAllocation()
568 ((ACPI_DEBUG_MEM_BLOCK *)(MemList->ListHead))->Previous = in AcpiUtTrackAllocation()
572 Allocation->Next = MemList->ListHead; in AcpiUtTrackAllocation()
573 Allocation->Previous = NULL; in AcpiUtTrackAllocation()
575 MemList->ListHead = Allocation; in AcpiUtTrackAllocation()
581 Allocation->Next = Element->Next; in AcpiUtTrackAllocation()
582 Allocation->Previous = Element; in AcpiUtTrackAllocation()
584 if (Element->Next) in AcpiUtTrackAllocation()
586 (Element->Next)->Previous = Allocation; in AcpiUtTrackAllocation()
589 Element->Next = Allocation; in AcpiUtTrackAllocation()
603 * PARAMETERS: Allocation - Address of allocated memory
604 * Component - Component type of caller
605 * Module - Source file name of caller
606 * Line - Line number of caller
619 UINT32 Line) in AcpiUtRemoveAllocation() argument
634 if (NULL == MemList->ListHead) in AcpiUtRemoveAllocation()
638 ACPI_ERROR ((Module, Line, in AcpiUtRemoveAllocation()
652 if (Allocation->Previous) in AcpiUtRemoveAllocation()
654 (Allocation->Previous)->Next = Allocation->Next; in AcpiUtRemoveAllocation()
658 MemList->ListHead = Allocation->Next; in AcpiUtRemoveAllocation()
661 if (Allocation->Next) in AcpiUtRemoveAllocation()
663 (Allocation->Next)->Previous = Allocation->Previous; in AcpiUtRemoveAllocation()
667 &Allocation->UserSpace, Allocation->Size)); in AcpiUtRemoveAllocation()
671 memset (&Allocation->UserSpace, 0xEA, Allocation->Size); in AcpiUtRemoveAllocation()
703 MemList->CurrentCount, in AcpiUtDumpAllocationInfo()
704 ROUND_UP_TO_1K (MemList->CurrentSize))); in AcpiUtDumpAllocationInfo()
708 MemList->MaxConcurrentCount, in AcpiUtDumpAllocationInfo()
709 ROUND_UP_TO_1K (MemList->MaxConcurrentSize))); in AcpiUtDumpAllocationInfo()
742 * PARAMETERS: Component - Component(s) to dump info for.
743 * Module - Module to dump info for. NULL means all.
783 Element = AcpiGbl_GlobalList->ListHead; in AcpiUtDumpAllocations()
786 if ((Element->Component & Component) && in AcpiUtDumpAllocations()
787 ((Module == NULL) || (0 == strcmp (Module, Element->Module)))) in AcpiUtDumpAllocations()
790 ACPI_DESCRIPTOR, &Element->UserSpace); in AcpiUtDumpAllocations()
792 if (Element->Size < sizeof (ACPI_COMMON_DESCRIPTOR)) in AcpiUtDumpAllocations()
794 AcpiOsPrintf ("%p Length 0x%04X %9.9s-%4.4u " in AcpiUtDumpAllocations()
795 "[Not a Descriptor - too small]\n", in AcpiUtDumpAllocations()
796 Descriptor, Element->Size, Element->Module, in AcpiUtDumpAllocations()
797 Element->Line); in AcpiUtDumpAllocations()
806 AcpiOsPrintf ("%p Length 0x%04X %9.9s-%4.4u [%s] ", in AcpiUtDumpAllocations()
807 Descriptor, Element->Size, Element->Module, in AcpiUtDumpAllocations()
808 Element->Line, AcpiUtGetDescriptorName (Descriptor)); in AcpiUtDumpAllocations()
815 AcpiUtDumpBuffer ((UINT8 *) Descriptor, Element->Size, in AcpiUtDumpAllocations()
827 if (Element->Size == sizeof (ACPI_OPERAND_OBJECT)) in AcpiUtDumpAllocations()
835 if (Element->Size == sizeof (ACPI_PARSE_OBJECT)) in AcpiUtDumpAllocations()
843 if (Element->Size == sizeof (ACPI_NAMESPACE_NODE)) in AcpiUtDumpAllocations()
861 AcpiUtGetTypeName (Descriptor->Object.Common.Type), in AcpiUtDumpAllocations()
862 Descriptor->Object.Common.ReferenceCount); in AcpiUtDumpAllocations()
868 Descriptor->Op.Asl.AmlOpcode); in AcpiUtDumpAllocations()
874 AcpiUtGetNodeName (&Descriptor->Node)); in AcpiUtDumpAllocations()
888 Element = Element->Next; in AcpiUtDumpAllocations()