I wrote that algorithm! A year later I found Hacker's delight, a wonderful book that had a much "faster" version of the same algorithm (less ops).
For anyone interested in this kind of things, you should go read that book. It actually is a delight.
197 karma · joined December 8, 2013
For anyone interested in this kind of things, you should go read that book. It actually is a delight.
Fixed! Thanks.
void *p;
free(p);
free(p);
Don't get me wrong, I get where you are going. But C philosophy is that libraries shouldn't do expensive checking to detect programmers' errors.Here is a simple, 200-line version of just the hierarchical allocator: https://github.com/esneider/talloc