kernel: add big-heap flag for running tests

When running Rust tests, a larger heap is needed. Add a kernel flag to
support this by default.

Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
Sean Cross 2023-12-25 23:35:37 +08:00
parent 006a50d206
commit 3658940260
2 changed files with 6 additions and 1 deletions

View file

@ -49,6 +49,7 @@ gdb-stub = ["gdbstub", "gdbstub_arch"]
print-panics = []
report-memory = ["stats_alloc"]
wrap-print = []
big-heap = [] # Cause heaps to start at 12 MM instead of 512 kB
v2p = ["xous-kernel/v2p"]
# patches for simulation targets ONLY. Applying these flags will result in totally broken security.

View file

@ -219,7 +219,11 @@ impl Default for ProcessInner {
mem_message_last: arch::mem::DEFAULT_MESSAGE_BASE,
mem_heap_base: arch::mem::DEFAULT_HEAP_BASE,
mem_heap_size: 0,
mem_heap_max: 524_288,
mem_heap_max: if cfg!("big-heap") {
1024 * 1024 * 12
} else {
1024 * 512
},
connection_map: [None; 32],
pid: unsafe { PID::new_unchecked(1) },
_reserved: [0; 1],