runtime: let Pinner preallocate a reusable ref array
With this change a Pinner preallocates an array of 5 pointers for
references to pinned objects. This reduces allocations when a pinner
is reused with up to 5 pinned objects.
This is a follow-up to CL 367296.
Signed-off-by: Sven Anderson <sven@anderson.de>
Change-Id: Ibea0b9ee4d7e39b0341a1da9d8276a4283e4956d
Reviewed-on: https://go-review.googlesource.com/c/go/+/496275 Reviewed-by: David Chase <drchase@google.com> Reviewed-by: Michael Knyszek <mknyszek@google.com>
Auto-Submit: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Michael Knyszek <mknyszek@google.com>