"Kelly Yancey" <kby...@alcnet.com> writes:
>   I'm afraid my question got lost amongst the see of overcommit messages. :)
>   I was curious if calloc() was overcommitted also?

Here's our calloc() implementation:

void *
calloc(num, size)
        size_t num;
        register size_t size;
{
        register void *p;

        size *= num;
        if ( (p = malloc(size)) )
                bzero(p, size);
        return(p);
}

so the answer is yes, it overcommits, but the bzero() may cause the
system to run out of swap.

DES
-- 
Dag-Erling Smorgrav - d...@flood.ping.uio.no


To Unsubscribe: send mail to majord...@freebsd.org
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to