3 ms·
Unlike the one in 7th edition unix? https://news.ycombinator.com/item?id=15269040 https://news.ycombinator.com/item?id=15269040
by fao_ 9y ago
Unlike the one in 7th edition unix? https://news.ycombinator.com/item?id=15269040 https://news.ycombinator.com/item?id=15269040
- huhtenberg 9y agoAre you implying that this ^ 40-year old piece of code is somehow suitable for modern use? A "pointer-per-block" alone will cost you 8 bytes of overhead on 64-bit machines. Both this and the 'while' loop in 'alloc' can be optimized away with rudimentary slab allocation. There's no threading support, etc.
- fao_ 9y agoYou stated that the example was "overly simplistic and largely optimized". I made no claim as to what system this code is optimized for, I was simply stating that it is possible to have an allocater the same size that is (or was) suitable for production use.