

Show HN: Malcheck, a tool to test memory allocation failure handling - AndyKelley

Here it is: https:&#x2F;&#x2F;github.com&#x2F;andrewrk&#x2F;malcheck<p>I posted the idea for this this morning[1] and got no responses but I decided to make a proof of concept anyway :-).<p>One problem that has presented itself is that &quot;memory leak&quot; is kind of a subjective concept. It&#x27;s really common to allocate memory and never free it, because the memory need not be freed until the application shuts down. valgrind has all kinds of voodoo to differentiate between memory intentionally never freed and accidental memory leaks. So you end up in common situations where the number of allocations is thousands more than the number of deallocations, and there&#x27;s still no leak.<p>So this can still help check the allocation failure handling code, but I don&#x27;t think it&#x27;s going to be able to find memory leaks since there would be too many false positives.<p>[1]: https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=9977032
======
dang
Stories without URLs get penalized, so you'd be better off posting this as a
link to your project, then adding the text as a first comment in the thread.

~~~
AndyKelley
Thanks for the tip. I'll take that into account next time.

