2 ms·
The class of problems you can solve with a C program that doesn't touch the heap profusely is small. C programs that touch the heap profusely often do it in ba
by kazinator 6y ago
The class of problems you can solve with a C program that doesn't touch the heap profusely is small. C programs that touch the heap profusely often do it in bad ways which are necessary so that they can be debugged to production. For instance, a commonly seen design decision in C programs is to avoid sharing objects, leading to increased memory use, increased calls to malloc and wasteful copying overhead. A Lisp program rarely calls the equivalent of strdup for instance; you don't worry about who is going to free this, and will two modules try to do it to the same object?