Printbuf rebuffed for now
Printbuf rebuffed for now
Posted Apr 28, 2022 19:42 UTC (Thu) by mb (subscriber, #50428)Parent article: Printbuf rebuffed for now
Dynamic memory allocation seems to be a bit of an overkill for such a feature. Usually users would have a rough estimate about how much buffer space will be needed. It can then often be cheaply allocated on the stack.
On the other hand, the seq_buf boilerplate (two variables and seq_buf_init) seems a bit verbose.
That should be combined into a macro for an easy to use on-stack use case.
