Code optimization

This commit is contained in:
刘河
2019-03-29 10:41:57 +08:00
parent 4b0aebd6a5
commit cc6d053b6d
32 changed files with 357 additions and 289 deletions

View File

@@ -52,12 +52,6 @@ func GetBufPoolCopy() ([]byte) {
return (*BufPoolCopy.Get().(*[]byte))[:PoolSizeCopy]
}
func PutBufPoolSmall(buf []byte) {
if cap(buf) == PoolSizeSmall {
BufPoolSmall.Put(buf[:PoolSizeSmall])
}
}
func PutBufPoolMax(buf []byte) {
if cap(buf) == PoolSize {
BufPoolMax.Put(buf[:PoolSize])