src/runtime/mheap.go | 4 +++- diff --git a/src/runtime/mheap.go b/src/runtime/mheap.go index db60f7a872708f957259c0a008806a50dd27d973..8db2fcc2888bdb04df7a5abde072404be8d7c4eb 100644 --- a/src/runtime/mheap.go +++ b/src/runtime/mheap.go @@ -917,7 +917,9 @@ // will round them *out* and release // more memory than we want.) start = (start + sys.PhysPageSize - 1) &^ (sys.PhysPageSize - 1) end &^= sys.PhysPageSize - 1 - if start == end { + if end <= start { + // start and end don't span a + // whole physical page. continue } }