Fix kernel heap max size potentially smaller than init

This commit is contained in:
Hui, Chunyang 2023-01-18 11:24:48 +08:00 committed by volcano
parent ea7a51be49
commit a9c0b1c4aa

@ -198,7 +198,8 @@ fn main() {
}
heap_max_size
} else {
parse_memory_size(DEFAULT_CONFIG.kernel_heap_max_size)
// If the user doesn't provide a value, use the max value as heap_max_size.
std::cmp::max(heap_init_size, parse_memory_size(DEFAULT_CONFIG.kernel_heap_max_size))
}
};