No need merging bulk free list again when revoking thread local runs
In RevokeThreadLocalRuns, the bracket index lock guards thread local free list
to avoid race condition with merging bulk free list to thread local free list
by GC thread in BulkFree. Thus the thread local list operation is atomic.
There are two cases when the mutator is unexpectedly terminated and then try to
revoke the thread local run for this mutator before termination:
1) Before termination, the thread local run is true, GC thread helps merge bulk
free list to thread local free list in last BulkFree. And the latest thread local
free list will be merged to free list either when this run is full or when revoking
this run in RevokeThreadLocalRuns. In this case the free list will finally be updated.
2) After termination, the thread local run is set to false, GC thread will help merge
bulk free list in the following BulkFree.
Thus no need to merge bulk free list to free list again in RevokeThreadLocalRuns.
Signed-off-by: Lei Li <firstname.lastname@example.org>
1 file changed