Lines Matching refs:heap
170 struct sys_heap heap; in ZTEST() local
175 sys_heap_init(&heap, heapmem, SMALL_HEAP_SZ); in ZTEST()
176 zassert_true(sys_heap_validate(&heap), ""); in ZTEST()
177 sys_heap_stress(testalloc, testfree, &heap, in ZTEST()
198 struct sys_heap heap; in ZTEST() local
204 sys_heap_init(&heap, heapmem, SMALL_HEAP_SZ); in ZTEST()
205 zassert_true(sys_heap_validate(&heap), ""); in ZTEST()
206 sys_heap_stress(testalloc, testfree, &heap, in ZTEST()
221 struct sys_heap heap; in ZTEST() local
231 sys_heap_init(&heap, heapmem, BIG_HEAP_SZ); in ZTEST()
232 zassert_true(sys_heap_validate(&heap), ""); in ZTEST()
233 sys_heap_stress(testalloc, testfree, &heap, in ZTEST()
258 struct sys_heap heap; in ZTEST() local
262 sys_heap_init(&heap, heapmem, SOLO_FREE_HEADER_HEAP_SZ); in ZTEST()
264 sys_heap_alloc(&heap, 1); in ZTEST()
265 zassert_true(sys_heap_validate(&heap), ""); in ZTEST()
295 struct sys_heap heap; in ZTEST() local
302 sys_heap_init(&heap, heapmem, SMALL_HEAP_SZ); in ZTEST()
307 p1 = sys_heap_alloc(&heap, 64); in ZTEST()
309 p2 = sys_heap_realloc(&heap, p1, 128); in ZTEST()
311 zassert_true(sys_heap_validate(&heap), "invalid heap"); in ZTEST()
320 p1 = sys_heap_alloc(&heap, 64); in ZTEST()
322 p2 = sys_heap_alloc(&heap, 64); in ZTEST()
324 p3 = sys_heap_realloc(&heap, p1, 128); in ZTEST()
326 zassert_true(sys_heap_validate(&heap), "invalid heap"); in ZTEST()
333 p1 = sys_heap_alloc(&heap, 128); in ZTEST()
335 p2 = sys_heap_realloc(&heap, p1, 64); in ZTEST()
337 zassert_true(sys_heap_validate(&heap), "invalid heap"); in ZTEST()
346 p1 = sys_heap_alloc(&heap, 61); in ZTEST()
348 p2 = sys_heap_alloc(&heap, 80); in ZTEST()
350 p3 = sys_heap_realloc(&heap, p1, 64); in ZTEST()
352 zassert_true(sys_heap_validate(&heap), "invalid heap"); in ZTEST()
362 p1 = sys_heap_aligned_alloc(&heap, 8, 32); in ZTEST()
364 p2 = sys_heap_alloc(&heap, 32); in ZTEST()
366 p3 = sys_heap_aligned_realloc(&heap, p1, 8, 36); in ZTEST()
368 zassert_true(sys_heap_validate(&heap), "invalid heap"); in ZTEST()
372 zassert_true(sys_heap_validate(&heap), "invalid heap"); in ZTEST()
377 p1 = sys_heap_aligned_alloc(&heap, 32, 32); in ZTEST()
378 p2 = sys_heap_aligned_alloc(&heap, 8, 32); in ZTEST()
379 p3 = sys_heap_aligned_realloc(&heap, p2, 8, 16); in ZTEST()
380 zassert_true(sys_heap_validate(&heap), "invalid heap"); in ZTEST()
384 p3 = sys_heap_aligned_alloc(&heap, 32, 8); in ZTEST()
385 zassert_true(sys_heap_validate(&heap), "invalid heap"); in ZTEST()