3 ms·
and moves and copies won't have potential for other memory management bugs? You'll still have memory management overhead and now additional complexity.
by stompin 10y ago
and moves and copies won't have potential for other memory management bugs? You'll still have memory management overhead and now additional complexity.
- moduspwnens14 10y agoAt a high level, isn't this like implementing your own "malloc" and "free" that just pulls from your process's own memory pool instead of the OS? Or is there more to it than that?
- clarry 10y agoNo, it's just placing the appropriate structs and buffers on the stack (when not provided by the caller). It does eliminate a certain couple classes of errors, and makes some others less likely. I didn't read all the code, but I don't think it's using alloca or the like. So the stack allocation sizes are known at compile time, and bounded unless there's some recursion going on (which is unlikely).