Lines Matching full:allocation

3  * Module Name: uttrack - Memory allocation tracking routines (debug only)
156 * Each memory allocation is tracked via a doubly linked list. Each
176 ACPI_DEBUG_MEM_BLOCK *Allocation);
236 * PARAMETERS: Size - Size of the allocation
254 ACPI_DEBUG_MEM_BLOCK *Allocation;
267 Allocation = AcpiOsAllocate (Size + sizeof (ACPI_DEBUG_MEM_HEADER));
268 if (!Allocation)
270 /* Report allocation error */
279 Allocation, Size, ACPI_MEM_MALLOC, Component, Module, Line);
282 AcpiOsFree (Allocation);
297 return ((void *) &Allocation->UserSpace);
305 * PARAMETERS: Size - Size of the allocation
323 ACPI_DEBUG_MEM_BLOCK *Allocation;
336 Allocation = AcpiOsAllocateZeroed (
338 if (!Allocation)
340 /* Report allocation error */
347 Status = AcpiUtTrackAllocation (Allocation, Size,
351 AcpiOsFree (Allocation);
366 return ((void *) &Allocation->UserSpace);
374 * PARAMETERS: Allocation - Address of the memory to deallocate
381 * DESCRIPTION: Frees the memory at Allocation
387 void *Allocation,
396 ACPI_FUNCTION_TRACE_PTR (UtFree, Allocation);
399 if (NULL == Allocation)
408 (((char *) Allocation) - sizeof (ACPI_DEBUG_MEM_HEADER)));
421 Allocation, DebugBlock));
430 * PARAMETERS: Allocation - Address of allocated memory
434 * 2) Element was found. Returns Allocation parameter.
438 * DESCRIPTION: Searches for an element in the global allocation tracking list.
455 ACPI_DEBUG_MEM_BLOCK *Allocation)
470 * assumption that a new allocation usually has a larger address
473 while (Element > Allocation)
485 if (Element == Allocation)
498 * PARAMETERS: Allocation - Address of allocated memory
499 * Size - Size of the allocation
507 * DESCRIPTION: Inserts an element into the global allocation tracking list.
513 ACPI_DEBUG_MEM_BLOCK *Allocation,
525 ACPI_FUNCTION_TRACE_PTR (UtTrackAllocation, Allocation);
544 Element = AcpiUtFindAllocation (Allocation);
545 if (Element == Allocation)
548 "UtTrackAllocation: Allocation (%p) already present in global list!",
549 Allocation));
555 Allocation->Size = (UINT32) Size;
556 Allocation->AllocType = AllocType;
557 Allocation->Component = Component;
558 Allocation->Line = Line;
560 AcpiUtSafeStrncpy (Allocation->Module, (char *) Module, ACPI_MAX_MODULE_NAME);
569 Allocation;
572 Allocation->Next = MemList->ListHead;
573 Allocation->Previous = NULL;
575 MemList->ListHead = Allocation;
581 Allocation->Next = Element->Next;
582 Allocation->Previous = Element;
586 (Element->Next)->Previous = Allocation;
589 Element->Next = Allocation;
603 * PARAMETERS: Allocation - Address of allocated memory
610 * DESCRIPTION: Deletes an element from the global allocation tracking list.
616 ACPI_DEBUG_MEM_BLOCK *Allocation,
639 "Empty allocation list, nothing to free!"));
652 if (Allocation->Previous)
654 (Allocation->Previous)->Next = Allocation->Next;
658 MemList->ListHead = Allocation->Next;
661 if (Allocation->Next)
663 (Allocation->Next)->Previous = Allocation->Previous;
667 &Allocation->UserSpace, Allocation->Size));
671 memset (&Allocation->UserSpace, 0xEA, Allocation->Size);
771 * Walk the allocation list.