| 255 | } |
| 256 | |
| 257 | static void * |
| 258 | heap_alloc_biggest(struct malloc_heap *heap, const char *type __rte_unused, |
| 259 | unsigned int flags, size_t align, bool contig) |
| 260 | { |
| 261 | struct malloc_elem *elem; |
| 262 | size_t size; |
| 263 | |
| 264 | align = RTE_CACHE_LINE_ROUNDUP(align); |
| 265 | |
| 266 | elem = find_biggest_element(heap, &size, flags, align, contig); |
| 267 | if (elem != NULL) { |
| 268 | elem = malloc_elem_alloc(elem, size, align, 0, contig); |
| 269 | |
| 270 | /* increase heap's count of allocated elements */ |
| 271 | heap->alloc_count++; |
| 272 | |
| 273 | asan_set_redzone(elem, size); |
| 274 | } |
| 275 | |
| 276 | return elem == NULL ? NULL : (void *)(&elem[1]); |
| 277 | } |
| 278 | |
| 279 | /* this function is exposed in malloc_mp.h */ |
| 280 | void |
no test coverage detected