From owner-freebsd-hackers Mon Jul 19 9: 7:16 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from flood.ping.uio.no (flood.ping.uio.no [129.240.78.31]) by hub.freebsd.org (Postfix) with ESMTP id D6EFF151E6 for ; Mon, 19 Jul 1999 09:07:13 -0700 (PDT) (envelope-from des@flood.ping.uio.no) Received: (from des@localhost) by flood.ping.uio.no (8.9.3/8.9.1) id SAA83131; Mon, 19 Jul 1999 18:06:37 +0200 (CEST) (envelope-from des) To: "Kelly Yancey" Cc: Subject: Re: Overcommit and calloc() References: <001501bed1fe$edf66980$291c453f@kbyanc.alcnet.com> From: Dag-Erling Smorgrav Date: 19 Jul 1999 18:06:37 +0200 In-Reply-To: "Kelly Yancey"'s message of "Mon, 19 Jul 1999 11:54:05 -0400" Message-ID: Lines: 25 X-Mailer: Gnus v5.5/Emacs 19.34 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG "Kelly Yancey" 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 - des@flood.ping.uio.no To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message