diff options
| author | Russ Cox <rsc@golang.org> | 2014-10-03 12:22:19 -0400 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2014-10-03 12:22:19 -0400 |
| commit | 904ec0098137f742e0dd96da3bc033d6a0b615d1 (patch) | |
| tree | 6a05a91443927524fcb78ac82df0142d8e6ae71f /src/runtime/mcache.c | |
| parent | d42328c9f749140adf947833e0381fc639c32737 (diff) | |
| parent | c65a47f890e33eeed6ee9d8b6d965a5534fb6e0e (diff) | |
| download | go-904ec0098137f742e0dd96da3bc033d6a0b615d1.tar.xz | |
[dev.garbage] merge default into dev.garbage
Diffstat (limited to 'src/runtime/mcache.c')
| -rw-r--r-- | src/runtime/mcache.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/runtime/mcache.c b/src/runtime/mcache.c index bb1fc54032..5fdbe32667 100644 --- a/src/runtime/mcache.c +++ b/src/runtime/mcache.c @@ -13,7 +13,7 @@ extern volatile intgo runtime·MemProfileRate; // dummy MSpan that contains no free objects. -static MSpan emptymspan; +MSpan runtime·emptymspan; MCache* runtime·allocmcache(void) @@ -27,7 +27,7 @@ runtime·allocmcache(void) runtime·unlock(&runtime·mheap.lock); runtime·memclr((byte*)c, sizeof(*c)); for(i = 0; i < NumSizeClasses; i++) - c->alloc[i] = &emptymspan; + c->alloc[i] = &runtime·emptymspan; // Set first allocation sample size. rate = runtime·MemProfileRate; @@ -83,7 +83,7 @@ runtime·MCache_Refill(MCache *c, int32 sizeclass) s = c->alloc[sizeclass]; if(s->freelist != nil) runtime·throw("refill on a nonempty span"); - if(s != &emptymspan) + if(s != &runtime·emptymspan) s->incache = false; // Get a new cached span from the central lists. @@ -107,9 +107,9 @@ runtime·MCache_ReleaseAll(MCache *c) for(i=0; i<NumSizeClasses; i++) { s = c->alloc[i]; - if(s != &emptymspan) { + if(s != &runtime·emptymspan) { runtime·MCentral_UncacheSpan(&runtime·mheap.central[i].mcentral, s); - c->alloc[i] = &emptymspan; + c->alloc[i] = &runtime·emptymspan; } } } |
