5 ms·
Reminds me of this anecdote I came across on the internets one time: https://groups.google.com/forum/message/raw?msg=comp.lang.ada/E9bNCvDQ12k/1tezW24ZxdAJ http
by jgh 9y ago
Reminds me of this anecdote I came across on the internets one time: https://groups.google.com/forum/message/raw?msg=comp.lang.ada/E9bNCvDQ12k/1tezW24ZxdAJ https://groups.google.com/forum/message/raw?msg=comp.lang.ad...
- jamiek88 9y agoThe ultimate in garbage collection indeed! Highly recommend reading that short tale! This lore is slowly being forgotten, thanks for that link.
- blub 9y agoI have heard of calculating a "memory budget" and pre-allocating that, but calculating a "leak budget" and doubling that doesn't seem like hygienic programming.
- coldtea 9y agoDoesn't have to be hygienic, it's enough that fixing it doesn't justify the time/money costs for the programmer.
- blub 9y agoWe wouldn't want the programmer to spend too much money/time on fixing errors. After all, it's not like people would die if there's an error in the missile software: http://www.gao.gov/mobile/products/IMTEC-92-26 http://www.gao.gov/mobile/products/IMTEC-92-26 Not to mention they added even more HW to work around the leaks. No wonder those projects always run over budget.
- coldtea 9y ago>We wouldn't want the programmer to spend too much money/time on fixing errors. After all, it's not like people would die if there's an error in the missile software When exactly did pkg_config became missile software? As they say in meme-land, "that escalated quickly". Here's a novel idea: how about the appropriate level of effort/time/YAGNI-stuff based on the domain? Or do you write one-time scripts with MISRA rules?
- blub 9y agoThe sub-thread I replied to was linking to an anecdote about missile software. But I still think not freeing is pretty lame even in short-lived tools. If one is using a no-op deallocator at least the code is designed properly and could be repurposed.
- CJefferson 9y agoThe problem with counting leaks is it counts memory you need until the very end of your program. There is no point calling free as you are exiting anyway, and I have seen programs where freeing everything took .5 seconds as the program was closing.
- nitrogen 9y agoAs someone whose startup was probably hindered by an almost religious adherence to testing with Valgrind (hardware was way too slow), I'd still say finding the real leaks and bugs is a lot easier when you don't have the noise of "expected" leaks.
- tjalfi 9y agoI submitted this post to HN a few months ago. The discussion is at https://news.ycombinator.com/item?id=14233542 https://news.ycombinator.com/item?id=14233542
- jimktrains2 9y agoIt seems you can no longer view Google groups without logging in?