Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> ... small slice and find some payloads append large amounts, write your own append that preemptively is more aggressive in cap bumping before calling the builtin append ...

gVisor netstack (userspace TCP/IP) uses a copy-on-write, reference-counted, tiered-pool for their arena-like alloc needs: https://gvisor.dev/blog/2022/10/24/buffer-pooling/ / https://archive.vn/YzB1C

The downside of their approach is, the client code is no longer dealing with just []byte (although, both the View and the Buffer type can vend out []bytes).



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: