johnsonjh / jleveldb

jleveldb: JLevelDB is an implementation of the LevelDB key/value database in the Go programming language, based on GoLevelDB

Home Page:https://github.com/johnsonjh/jleveldb

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

(SCC-SA6002) Storing non-pointer values in `sync.Pool` allocates memory

johnsonjh opened this issue · comments

Description

A sync.Pool is used to avoid unnecessary allocations and reduce the amount of work the garbage collector has to do. When passing a value that is not a pointer to a function that accepts an interface, the value needs to be placed on the heap, which means an additional allocation. …

Occurrences

There is 1 occurrence of this issue in the repository.

See all occurrences on DeepSource → deepsource.io/gh/johnsonjh/jleveldb/issue/SCC-SA6002/occurrences/

⚠️ This has been marked to be closed in 7 days.