diff --git a/src/heap.cpp b/src/heap.cpp index 0700b1f465..be26c9ea3e 100644 --- a/src/heap.cpp +++ b/src/heap.cpp @@ -346,6 +346,10 @@ class Segment { map(map) { if (desired) { + if (minimum == 0) { + minimum = 1; + } + assert(context, desired >= minimum); capacity_ = desired;