mirror of
https://github.com/golang/go
synced 2024-11-12 08:10:21 -07:00
runtime: improve precision of GC_REGION
R=rsc CC=golang-dev https://golang.org/cl/7383054
This commit is contained in:
parent
5a09f1b3be
commit
01ab9a012a
@ -546,7 +546,7 @@ static void
|
||||
scanblock(Workbuf *wbuf, Obj *wp, uintptr nobj, bool keepworking)
|
||||
{
|
||||
byte *b, *arena_start, *arena_used;
|
||||
uintptr n, i, end_b, elemsize, ti, objti, count, type;
|
||||
uintptr n, i, end_b, elemsize, size, ti, objti, count, type;
|
||||
uintptr *pc, precise_type, nominal_size;
|
||||
uintptr *map_ret, mapkey_size, mapval_size, mapkey_ti, mapval_ti;
|
||||
void *obj;
|
||||
@ -905,9 +905,14 @@ scanblock(Workbuf *wbuf, Obj *wp, uintptr nobj, bool keepworking)
|
||||
continue;
|
||||
|
||||
case GC_REGION:
|
||||
// TODO(atom): to be expanded in a next CL. Same as GC_APTR for now.
|
||||
obj = (void*)(stack_top.b + pc[1]);
|
||||
size = pc[2];
|
||||
objti = pc[3];
|
||||
pc += 4;
|
||||
|
||||
*objbufpos++ = (Obj){obj, size, objti};
|
||||
if(objbufpos == objbuf_end)
|
||||
flushobjbuf(objbuf, &objbufpos, &wp, &wbuf, &nobj);
|
||||
break;
|
||||
|
||||
case GC_CHAN:
|
||||
|
Loading…
Reference in New Issue
Block a user