4 ms·
Your C library does not check malloc returns and also malloc and free everywhere inside library functions are not the best way to write a C library.
by up2isomorphism 6y ago
Your C library does not check malloc returns and also malloc and free everywhere inside library functions are not the best way to write a C library.
- gattr 6y agoAs for malloc/free, I'm guessing the recommendation is to allow the user to pass their own allocator on library initialization? Non-checked malloc returns - ouch, I count 12 (out of 56) without a check. Thanks for pointing this out.