Skip to content

Commit 0c8d717

Browse files
committed
TEST HACK: tr_info() in DEBUG_HEAP even when successful
No crash when guarded with if(trace_get()) Signed-off-by: Marc Herbert <marc.herbert@intel.com>
1 parent f1531b0 commit 0c8d717

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/lib/alloc.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,7 @@ static void free_block(void *ptr)
548548
#endif
549549
}
550550

551-
#if CONFIG_DEBUG_HEAP
551+
#if CONFIG_DEBUG_HEAP || 1
552552

553553
static void trace_heap_blocks(struct mm_heap *heap)
554554
{
@@ -651,6 +651,11 @@ static void alloc_trace_heap(enum mem_zone zone, uint32_t caps, size_t bytes)
651651
tr_err(&mem_tr, "failed to alloc 0x%x bytes zone 0x%x caps 0x%x flags 0x%x", \
652652
bytes, zone, caps, flags); \
653653
alloc_trace_heap(zone, caps, bytes); \
654+
} \
655+
else { \
656+
tr_info(&mem_tr, "MARC: allocated ptr %p 0x%x bytes at zone 0x%x", \
657+
ptr, bytes, zone); \
658+
} \
654659
}
655660

656661
#else

0 commit comments

Comments
 (0)