]> Cypherpunks repositories - gostls13.git/commit
fmt: hold on to all free buffers, regardless of size
authorBrad Fitzpatrick <bradfitz@golang.org>
Sun, 3 Apr 2016 01:34:29 +0000 (01:34 +0000)
committerBrad Fitzpatrick <bradfitz@golang.org>
Sun, 3 Apr 2016 06:20:37 +0000 (06:20 +0000)
commit0656da910a1750921961b0955f9150f326199847
tree1b5d059c02e62b78cd56f833442e92e8ed39d357
parent163ff700b8ac3192fa1cb1424e5facf060683dd2
fmt: hold on to all free buffers, regardless of size

This code made sense before fmt switched to using sync.Pool, but a
sync.Pool clears all items on GC, so not reusing something based on
size is just a waste of memory.

Change-Id: I201312b0ee6c572ff3c0ffaf71e42623a160d23f
Reviewed-on: https://go-review.googlesource.com/21480
Reviewed-by: Rob Pike <r@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/fmt/print.go