diff options
Diffstat (limited to 'src/pkg/runtime/mcentral.c')
| -rw-r--r-- | src/pkg/runtime/mcentral.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/pkg/runtime/mcentral.c b/src/pkg/runtime/mcentral.c index 203558fca5..9291c24856 100644 --- a/src/pkg/runtime/mcentral.c +++ b/src/pkg/runtime/mcentral.c @@ -263,6 +263,8 @@ MCentral_Grow(MCentral *c) runtime·unlock(c); runtime·MGetSizeClassInfo(c->sizeclass, &size, &npages, &n); s = runtime·MHeap_Alloc(&runtime·mheap, npages, c->sizeclass, 0, 1); + if(s->next != nil || s->prev != nil) + runtime·throw("internal error: MSpan should not be in a list"); if(s == nil) { // TODO(rsc): Log out of memory runtime·lock(c); |
