Terry Lambert <[EMAIL PROTECTED]> wrote: > >The FreeBSD malloc guarantees that the pages are zeroed before being >obtained from the system; this is probably the majority of the cost. >It is a security measure, so that you do not leak data from one process >to another through anonymous pages. > >The Linux malloc does not.
Utter bollocks. FreeBSD malloc can be configured to re-initialize memory on every allocation, but this is designed to assist with buggy programs, it is *not* a security measure. Memory obtained from the kernel on *all* unices (including Linux) is zeroed; that is when security matters, not in malloc. This will not affect the relative performance of phk and gnu malloc. >The FreeBSD malloc references an environment variable and a readlink() >of a potentially non-existant symbolic link containing configuration >data for the malloc. Once at program startup. This is not a significant cost. >The FreeBSD allocation is an overcommit allocation True for Linux too, by default. Tony. -- f.a.n.finch <[EMAIL PROTECTED]> http://dotat.at/ NORTH UTSIRE: EAST 4 OR 5 INCREASING 6 TO GALE 8. RAIN. MODERATE. To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message