18 ms·
I don't know, but when I use C, I like to statically allocate everything if at all possible, I don't free() anything, I let the OS clean everything up at exit()
by ihatepython 4y ago
I don't know, but when I use C, I like to statically allocate everything if at all possible, I don't free() anything, I let the OS clean everything up at exit(). A lot of the small Unix utilities don't necessarily need dynamic memory allocation IMO
- adrianN 4y agoThat's a good strategy in C++ too. Check the MISRA guidelines for example.