diff --git a/libsupport_zynq/src/ram.rs b/libsupport_zynq/src/ram.rs index 7a3a0af..a712374 100644 --- a/libsupport_zynq/src/ram.rs +++ b/libsupport_zynq/src/ram.rs @@ -90,5 +90,11 @@ pub fn init_alloc_core1() { #[alloc_error_handler] fn alloc_error(layout: core::alloc::Layout) -> ! { - panic!("Core {} alloc_error, layout: {:?}", MPIDR.read().cpu_id(), layout); + let id = MPIDR.read().cpu_id(); + let heap = if id == 0 { + ALLOCATOR.0.lock() + } else { + ALLOCATOR.1.lock() + }; + panic!("Core {} alloc_error, layout: {:?}, used memory: {}", id, layout, heap.used()); }