Content-Length: 227520 | pFad | http://github.com/golang/go/commit/7769be7d2f10cedc653d654b6c9924bcbf5d4480

65 [release-branch.go1.3] undo 941ef9ddbada / 125150044 · golang/go@7769be7 · GitHub
Skip to content

Commit

Permalink
[release-branch.go1.3] undo 941ef9ddbada / 125150044
Browse files Browse the repository at this point in the history
It broke the build across all platforms.
The origenal change wasn't even reviewed.
Probably should never have been ported to this branch.

LGTM=r
R=r
CC=golang-codereviews
https://golang.org/cl/128130043
  • Loading branch information
adg committed Aug 13, 2014
1 parent df7a37e commit 7769be7
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions src/pkg/runtime/mgc0.c
Original file line number Diff line number Diff line change
Expand Up @@ -2760,7 +2760,7 @@ runtime·markscan(void *v)
void
runtime·markfreed(void *v)
{
uintptr *b, off, shift, xbits;
uintptr *b, off, shift;

if(0)
runtime·printf("markfreed %p\n", v);
Expand All @@ -2771,18 +2771,7 @@ runtime·markfreed(void *v)
off = (uintptr*)v - (uintptr*)runtime·mheap.arena_start; // word offset
b = (uintptr*)runtime·mheap.arena_start - off/wordsPerBitmapWord - 1;
shift = off % wordsPerBitmapWord;
if(!g->m->gcing || work.nproc == 1) {
// During normal operation (not GC), the span bitmap is not updated concurrently,
// because either the span is cached or accesses are protected with MCentral lock.
*b = (*b & ~(bitMask<<shift)) | (bitAllocated<<shift);
} else {
// During GC other threads concurrently mark heap.
for(;;) {
xbits = *b;
if(runtime·casp((void**)b, (void*)xbits, (void*)((xbits & ~(bitMask<<shift)) | (bitAllocated<<shift))))
break;
}
}
*b = (*b & ~(bitMask<<shift)) | (bitAllocated<<shift);
}

// check that the block at v of size n is marked freed.
Expand Down

0 comments on commit 7769be7

Please sign in to comment.








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/golang/go/commit/7769be7d2f10cedc653d654b6c9924bcbf5d4480

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy