You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
proposal: Go 2: support memory pool in context or thread for real request. just like ngx_pool_cleanup_t,ngx_pool_t in nginx. it can reduce gc and avoid lock
#29091
Closed
buptbill220 opened this issue
Dec 4, 2018
· 1 comment
buptbill220
changed the title
proposal: Go 2: support memory pool in context or thread for real request, avoid memory fragment
proposal: Go 2: support memory pool in context or thread for real request. just like ngx_pool_cleanup_t,ngx_pool_t in nginx. it can reduce gc and avoid lock
Dec 4, 2018
This is something that can be done outside of the Go standard library. Let's do it there first, and then see if it is useful. Closing this proposal.
Note that memory is already allocated from a per-thread cache. I don't see why using a pool would avoid locks. I agree that in some cases it might avoid a GC, but only with considerable care in management of the memory allocated from the pool.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
no
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
What did you expect to see?
What did you see instead?
The text was updated successfully, but these errors were encountered: