Hacker News new | ask | show | jobs
by charcircuit 913 days ago
In this case the state takes a constant amount of space so it is just a matter of allocating a single struct.

With the approach of having the caller allocate you have carefully design the API to make it possible.