Merge pull request #2474 from Skgland/fix-looping-memory-allocation

Fix looping memory allocation
This commit is contained in:
Mark Thom
2024-08-17 20:58:03 -06:00
committed by GitHub
4 changed files with 75 additions and 49 deletions

View File

@@ -174,7 +174,9 @@ impl Stack {
let ptr = self.buf.alloc(frame_size);
if ptr.is_null() {
self.buf.grow();
if !self.buf.grow() {
panic!("growing the stack failed")
}
} else {
return ptr;
}