3 ms·
When writing C libraries, it's good form to be able to init your instance with allocation and logging function pointers. That lets you play nice with most any
by monocasa 7y ago
When writing C libraries, it's good form to be able to init your instance with allocation and logging function pointers. That lets you play nice with most any env you're being pulled into, and gives your consumers an obvious place for nice hooks for debugging.
- antirez 7y agoYep, that's what I do in order to be able to fuzz test with an OOM returning malloc() in my lib. Agreed on the fact it's good form.