4 ms·
To give you a definite answer: Yes. If you have a calloc, even along conditional paths, it will understand the value along that path is zero until the store, a
by DannyBee 10y ago
To give you a definite answer:
Yes.
If you have a calloc, even along conditional paths, it will understand the value along that path is zero until the store, and that the zero is killed by the store.
What it will do varies, because it does not want to screw up the sparse memory usage.
But, for example, it even understands how to take the zero values + stores and turn them into a memset and kill the stores, etc.
It generally does not do something like split the allocation into a calloc and malloc+memset part, or whatever