6 ms·
> But if zeroing memory is necessary for the program to be correct, hang the cost. Sure. And your application should bear that cost and not necessarily every a
by shadowfox 12y ago
> But if zeroing memory is necessary for the program to be correct, hang the cost.
Sure. And your application should bear that cost and not necessarily every application written in C. Maybe there is a case for using a safer malloc implementation for your program?
> I don't know what sort of "real time applications" would require gambling on the initial state of memory.
This isn't really gambling. If you know you are going to initialize the memory with sane values immediately (and this is a common practice), it is a waste to do that initial zeroing.
- ArkyBeagle 12y agoAh - in that case, I'd agree. I couldn't draw to that conclusion from the text provided - that's just as good as zeroing ( and, as you say ) renders the zeroing moot.