Increases DebugConsole heap to 1MB

There is a temporary desire to keep ZMODEM uploads as state in
DebugConsole. Since realistic package ZIP files might be larger than
16KB, this change increases the heap size to have a lot of excess.

Change-Id: Iabb5014cb77cf828f77d4553b7f304248c085114
GitOrigin-RevId: 2ae49570a887d5bd2d4672fb3e134c8a1394190e
This commit is contained in:
Matt Harvey 2021-09-22 19:39:22 -07:00 committed by Sam Leffler
parent 36677807e8
commit 251c907f49

View File

@ -27,8 +27,9 @@ pub extern "C" fn pre_init() {
// NB: set to Trace for early-boot msgs // NB: set to Trace for early-boot msgs
log::set_max_level(log::LevelFilter::Debug); log::set_max_level(log::LevelFilter::Debug);
// TODO(sleffler): temp until we integrate with seL4 // TODO(b/200946906): Review per-component heap allocations, including this one.
static mut HEAP_MEMORY: [u8; 16 * 1024] = [0; 16 * 1024]; const HEAP_SIZE: usize = 1 << 20;
static mut HEAP_MEMORY: [u8; HEAP_SIZE] = [0; HEAP_SIZE];
unsafe { unsafe {
kata_allocator::ALLOCATOR.init(HEAP_MEMORY.as_mut_ptr() as usize, HEAP_MEMORY.len()); kata_allocator::ALLOCATOR.init(HEAP_MEMORY.as_mut_ptr() as usize, HEAP_MEMORY.len());
trace!( trace!(