Re:Memory management in C programs
by adamnemecek on Monday March 17, 2014 @02:28AM
(#7413477)
What's your point exactly?
[ Parent
| on HN ]
I welcome the down votes.
My point - I read the article and agree as described are typical ways of dealing with memory in C (and in particular within Nethack). At the end of the day, dynamic memory allocation comes down to tracking mallocs and frees and whatever extra book keeping you put on top of them.
Reference counting came up. There are libraries that help with such, but you better understand what that actually means.
Wrapping primitives in higher level abstractions can lead many developers to wondering why there is a memory leak. Before you embrace the abstractions, you better darn well understand what is going on under the hood.
I've seen many inexperienced devs get lost in simple valgrind dumps.
You're being downvoted because these comments have little to do with the content of the article, which is about "dirty" low-level memory management techniques designed to avoid naive heap allocation, not trying to abstract the problem away.