[zion] Fix an over-allocation bug when creating a memory object
This commit is contained in:
parent
0f0e39d1e9
commit
b6735d3175
3 changed files with 9 additions and 2 deletions
|
|
@ -24,7 +24,8 @@ KernelHeap::KernelHeap(uint64_t lower_bound, uint64_t upper_bound)
|
|||
|
||||
void* KernelHeap::Allocate(uint64_t size) {
|
||||
if (next_addr_ + size >= upper_bound_) {
|
||||
panic("Kernel Heap Overrun");
|
||||
panic("Kernel Heap Overrun (next, size, max): %m, %x, %m", next_addr_, size,
|
||||
upper_bound_);
|
||||
}
|
||||
#if K_HEAP_DEBUG
|
||||
RecordSize(size);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue