> (the strdup()/strcpy() bug differs between platforms, because it's an > off-by-one error that leaves the strings unterminated. on linux, > memory is prefilled with 0 bytes on malloc, not so on BSD and Solaris > platforms.)
It's not prefilled like that on Linux, either. It's just that sometimes you get newly allocated memory from brk(), and large allocations come from mmap(), and both of those cases are zeroed by the kernel. Small allocations on Linux may be filled with garbage, too. (I think the same is true on the BSDs, actually: it's just that the thresholds are different.) -- `Once again, I must remark on the far-reaching extent of my ladylike nature.' --- Rosie Taylor
