diff options
Diffstat (limited to 'src/pkg/runtime/mcache.c')
-rw-r--r-- | src/pkg/runtime/mcache.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/pkg/runtime/mcache.c b/src/pkg/runtime/mcache.c index 518e00c12..64803e703 100644 --- a/src/pkg/runtime/mcache.c +++ b/src/pkg/runtime/mcache.c @@ -21,7 +21,7 @@ runtime·MCache_Alloc(MCache *c, int32 sizeclass, uintptr size, int32 zeroed) l = &c->list[sizeclass]; if(l->list == nil) { // Replenish using central lists. - n = runtime·MCentral_AllocList(&runtime·mheap.central[sizeclass], + n = runtime·MCentral_AllocList(&runtime·mheap->central[sizeclass], runtime·class_to_transfercount[sizeclass], &first); if(n == 0) runtime·throw("out of memory"); @@ -43,11 +43,6 @@ runtime·MCache_Alloc(MCache *c, int32 sizeclass, uintptr size, int32 zeroed) // block is zeroed iff second word is zero ... if(size > sizeof(uintptr) && ((uintptr*)v)[1] != 0) runtime·memclr((byte*)v, size); - else { - // ... except for the link pointer - // that we used above; zero that. - v->next = nil; - } } c->local_cachealloc += size; c->local_objects++; @@ -74,7 +69,7 @@ ReleaseN(MCache *c, MCacheList *l, int32 n, int32 sizeclass) c->size -= n*runtime·class_to_size[sizeclass]; // Return them to central free list. - runtime·MCentral_FreeList(&runtime·mheap.central[sizeclass], n, first); + runtime·MCentral_FreeList(&runtime·mheap->central[sizeclass], n, first); } void |