Lines Matching refs:allocation
356 void *allocation; in acpi_ut_allocate() local
370 allocation = acpi_os_allocate (size); in acpi_ut_allocate()
371 if (!allocation) { in acpi_ut_allocate()
380 return_PTR (allocation); in acpi_ut_allocate()
406 void *allocation; in acpi_ut_callocate() local
420 allocation = acpi_os_allocate (size); in acpi_ut_callocate()
421 if (!allocation) { in acpi_ut_callocate()
431 ACPI_MEMSET (allocation, 0, size); in acpi_ut_callocate()
432 return_PTR (allocation); in acpi_ut_callocate()
471 struct acpi_debug_mem_block *allocation; in acpi_ut_allocate_and_track() local
475 allocation = acpi_ut_allocate (size + sizeof (struct acpi_debug_mem_block), component, in acpi_ut_allocate_and_track()
477 if (!allocation) { in acpi_ut_allocate_and_track()
481 status = acpi_ut_track_allocation (ACPI_MEM_LIST_GLOBAL, allocation, size, in acpi_ut_allocate_and_track()
484 acpi_os_free (allocation); in acpi_ut_allocate_and_track()
491 return ((void *) &allocation->user_space); in acpi_ut_allocate_and_track()
517 struct acpi_debug_mem_block *allocation; in acpi_ut_callocate_and_track() local
521 allocation = acpi_ut_callocate (size + sizeof (struct acpi_debug_mem_block), component, in acpi_ut_callocate_and_track()
523 if (!allocation) { in acpi_ut_callocate_and_track()
531 status = acpi_ut_track_allocation (ACPI_MEM_LIST_GLOBAL, allocation, size, in acpi_ut_callocate_and_track()
534 acpi_os_free (allocation); in acpi_ut_callocate_and_track()
541 return ((void *) &allocation->user_space); in acpi_ut_callocate_and_track()
562 void *allocation, in acpi_ut_free_and_track() argument
571 ACPI_FUNCTION_TRACE_PTR ("ut_free", allocation); in acpi_ut_free_and_track()
574 if (NULL == allocation) { in acpi_ut_free_and_track()
582 (((char *) allocation) - sizeof (struct acpi_debug_mem_header))); in acpi_ut_free_and_track()
596 ACPI_DEBUG_PRINT ((ACPI_DB_ALLOCATIONS, "%p freed\n", allocation)); in acpi_ut_free_and_track()
617 void *allocation) in acpi_ut_find_allocation() argument
634 if (element == allocation) { in acpi_ut_find_allocation()
665 struct acpi_debug_mem_block *allocation, in acpi_ut_track_allocation() argument
677 ACPI_FUNCTION_TRACE_PTR ("ut_track_allocation", allocation); in acpi_ut_track_allocation()
695 element = acpi_ut_find_allocation (list_id, allocation); in acpi_ut_track_allocation()
698 allocation)); in acpi_ut_track_allocation()
700 ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Element %p Address %p\n", element, allocation)); in acpi_ut_track_allocation()
707 allocation->size = (u32) size; in acpi_ut_track_allocation()
708 allocation->alloc_type = alloc_type; in acpi_ut_track_allocation()
709 allocation->component = component; in acpi_ut_track_allocation()
710 allocation->line = line; in acpi_ut_track_allocation()
712 ACPI_STRNCPY (allocation->module, module, ACPI_MAX_MODULE_NAME); in acpi_ut_track_allocation()
717 ((struct acpi_debug_mem_block *)(mem_list->list_head))->previous = allocation; in acpi_ut_track_allocation()
720 allocation->next = mem_list->list_head; in acpi_ut_track_allocation()
721 allocation->previous = NULL; in acpi_ut_track_allocation()
723 mem_list->list_head = allocation; in acpi_ut_track_allocation()
750 struct acpi_debug_mem_block *allocation, in acpi_ut_remove_allocation() argument
783 if (allocation->previous) { in acpi_ut_remove_allocation()
784 (allocation->previous)->next = allocation->next; in acpi_ut_remove_allocation()
787 mem_list->list_head = allocation->next; in acpi_ut_remove_allocation()
790 if (allocation->next) { in acpi_ut_remove_allocation()
791 (allocation->next)->previous = allocation->previous; in acpi_ut_remove_allocation()
796 ACPI_MEMSET (&allocation->user_space, 0xEA, allocation->size); in acpi_ut_remove_allocation()
798 ACPI_DEBUG_PRINT ((ACPI_DB_ALLOCATIONS, "Freeing size 0%X\n", allocation->size)); in acpi_ut_remove_allocation()