Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.



Malloc 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.


Yeah, that's what I'm saying.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: