On Thu, Jun 14, 2007 at 06:04:27PM -0700, Matthew Dillon wrote:
>     From this point of view it is much, much better to bzero() memory that
>     is already mapped then it is to map/unmap new memory.

For kernel land, you are right. For userland, there's one big down-side
to always bzero/memset newly allocated memory: it touches the page and
thereby can add a lot of back pressure on you are not having that much
memory. This can be completely uncessary at that point and at least one
application of using calloc with large parameter values is creation of a
hash table. Forcing it to consume memory is not such a good idea.

Joerg
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to