mirror of
https://github.com/ScuroNeko/mtg.git
synced 2026-09-01 16:01:55 +03:00
Decrease a relay buffer size for MIPS devices
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
package relay
|
||||
|
||||
import "sync"
|
||||
|
||||
var bufPool = sync.Pool{
|
||||
New: func() any {
|
||||
b := make([]byte, bufPoolSize)
|
||||
return &b
|
||||
},
|
||||
}
|
||||
|
||||
func acquireBuffer() *[]byte {
|
||||
return bufPool.Get().(*[]byte)
|
||||
}
|
||||
|
||||
func releaseBuffer(p *[]byte) {
|
||||
bufPool.Put(p)
|
||||
}
|
||||
Reference in New Issue
Block a user