]> Cypherpunks repositories - gostls13.git/commit
runtime: manage a pool of spanSetBlocks and free them eagerly
authorMichael Anthony Knyszek <mknyszek@google.com>
Thu, 13 Feb 2020 21:13:40 +0000 (21:13 +0000)
committerMichael Knyszek <mknyszek@google.com>
Mon, 27 Apr 2020 17:50:41 +0000 (17:50 +0000)
commitd1798d5aa01501a6c7d0508441532321c90a7378
tree200b2dff38e8e74a700c74e07525c099aa556a98
parent8af8fa910329242caa7402561ed011d2de3f00e9
runtime: manage a pool of spanSetBlocks and free them eagerly

This change adds a global pool of spanSetBlocks to the spanSet data
structure and adds support for eagerly freeing these blocks back to the
pool if the block goes empty.

This change prepares us to use this data structure in more places in the
runtime by allowing reuse of spanSetBlock.

Updates #37487.

Change-Id: I0752226e3667a9e3e1d87c9b66edaedeae1ac23f
Reviewed-on: https://go-review.googlesource.com/c/go/+/221180
Run-TryBot: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
src/runtime/mspanset.go