Lines Matching defs:allocation

4  * Module Name: uttrack - Memory allocation tracking routines (debug only)
14 * Each memory allocation is tracked via a doubly linked list. Each
32 *allocation);
80 * PARAMETERS: size - Size of the allocation
94 struct acpi_debug_mem_block *allocation;
105 allocation =
107 if (!allocation) {
109 /* Report allocation error */
118 acpi_ut_track_allocation(allocation, size, ACPI_MEM_MALLOC,
121 acpi_os_free(allocation);
135 return ((void *)&allocation->user_space);
142 * PARAMETERS: size - Size of the allocation
157 struct acpi_debug_mem_block *allocation;
168 allocation =
171 if (!allocation) {
173 /* Report allocation error */
180 status = acpi_ut_track_allocation(allocation, size,
184 acpi_os_free(allocation);
198 return ((void *)&allocation->user_space);
205 * PARAMETERS: allocation - Address of the memory to deallocate
217 acpi_ut_free_and_track(void *allocation,
223 ACPI_FUNCTION_TRACE_PTR(ut_free, allocation);
225 if (NULL == allocation) {
232 (((char *)allocation) -
246 allocation, debug_block));
254 * PARAMETERS: allocation - Address of allocated memory
262 * DESCRIPTION: Searches for an element in the global allocation tracking list.
279 *allocation)
292 * assumption that a new allocation usually has a larger address
295 while (element > allocation) {
306 if (element == allocation) {
317 * PARAMETERS: allocation - Address of allocated memory
318 * size - Size of the allocation
326 * DESCRIPTION: Inserts an element into the global allocation tracking list.
331 acpi_ut_track_allocation(struct acpi_debug_mem_block *allocation,
340 ACPI_FUNCTION_TRACE_PTR(ut_track_allocation, allocation);
356 element = acpi_ut_find_allocation(allocation);
357 if (element == allocation) {
360 allocation));
366 allocation->size = (u32)size;
367 allocation->alloc_type = alloc_type;
368 allocation->component = component;
369 allocation->line = line;
371 acpi_ut_safe_strncpy(allocation->module, (char *)module,
380 previous = allocation;
383 allocation->next = mem_list->list_head;
384 allocation->previous = NULL;
386 mem_list->list_head = allocation;
390 allocation->next = element->next;
391 allocation->previous = element;
394 (element->next)->previous = allocation;
397 element->next = allocation;
409 * PARAMETERS: allocation - Address of allocated memory
416 * DESCRIPTION: Deletes an element from the global allocation tracking list.
421 acpi_ut_remove_allocation(struct acpi_debug_mem_block *allocation,
439 "Empty allocation list, nothing to free!"));
451 if (allocation->previous) {
452 (allocation->previous)->next = allocation->next;
454 mem_list->list_head = allocation->next;
457 if (allocation->next) {
458 (allocation->next)->previous = allocation->previous;
462 &allocation->user_space, allocation->size));
466 memset(&allocation->user_space, 0xEA, allocation->size);
554 * Walk the allocation list.