libsupport_zynq/ram: split allocator for each core. #47
|
@ -90,5 +90,11 @@ pub fn init_alloc_core1() {
|
||||||
|
|
||||||
#[alloc_error_handler]
|
#[alloc_error_handler]
|
||||||
fn alloc_error(layout: core::alloc::Layout) -> ! {
|
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());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue