2 ms·
It makes the code so much simpler. And quite probably faster as there's less malloc/free churn. A lot of problems break down to: * we need this effectively fo
by procaryote 2y ago
It makes the code so much simpler. And quite probably faster as there's less malloc/free churn.
A lot of problems break down to:
* we need this effectively forever (i.e. until config reload)
* we need this very briefly when processing a task or request
Sometimes you need a cache that has intermediate lifetimes, but that is a much smaller problem to deal with, and you can often cope with manual memory management for that
Hook any file handles and other resource cleanup functions into the same pools and you have a pretty easy life.