]> Cypherpunks repositories - gostls13.git/commit
runtime: increase number of stack orders to 4
authorKeith Randall <khr@golang.org>
Sat, 27 Dec 2014 02:10:59 +0000 (18:10 -0800)
committerKeith Randall <khr@golang.org>
Wed, 7 Jan 2015 20:13:06 +0000 (20:13 +0000)
commit5aae246f1e1c59511a82398d88128e9fc9357107
treec57bc6730c496aba5796c36d8a813e04fa0ba67a
parentce36552083ef281d4c90b2396a56afa039e119b0
runtime: increase number of stack orders to 4

Cache 2KB, 4KB, 8KB, and 16KB stacks.  Larger stacks
will be allocated directly.  There is no point in cacheing
32KB+ stacks as we ask for and return 32KB at a time
from the allocator.

Note that the minimum stack is 8K on windows/64bit and 4K on
windows/32bit and plan9.  For these os/arch combinations,
the number of stack orders is less so that we have the same
maximum cached size.

Fixes #9045

Change-Id: Ia4195dd1858fb79fc0e6a91ae29c374d28839e44
Reviewed-on: https://go-review.googlesource.com/2098
Reviewed-by: Russ Cox <rsc@golang.org>
src/runtime/malloc2.go