Decrease a relay buffer size for MIPS devices

This commit is contained in:
9seconds
2026-03-29 21:42:26 +02:00
parent 1725a0d721
commit d3a090d6b4
4 changed files with 43 additions and 12 deletions
+18
View File
@@ -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)
}