5 ms·
I tried on Linux, and got all zeroes. Of course that's for a trivial program. If you freed something, that probably wasn't returned to the OS, and the next mal
by dale_glass 4y ago
I tried on Linux, and got all zeroes.
Of course that's for a trivial program. If you freed something, that probably wasn't returned to the OS, and the next malloc might just recycle it.
- bluedino 4y agoMalloc a bunch of memory, dirty it, free it, then malloc some more. And then check. Your first request in your program, you'll get clean memory from the OS.
- dale_glass 4y agoYeah, that's what I'm saying.