From owner-freebsd-hackers Tue Apr 13 13:36:59 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from bingsun1.cc.binghamton.edu (bingsun1.cc.binghamton.edu [128.226.1.2]) by hub.freebsd.org (Postfix) with ESMTP id B141314C8E for ; Tue, 13 Apr 1999 13:36:54 -0700 (PDT) (envelope-from bf20761@binghamton.edu) Received: from localhost by bingsun1.cc.binghamton.edu (8.9.3/8.9.3) with SMTP id QAA22737 for ; Tue, 13 Apr 1999 16:34:30 -0400 (EDT) X-Authentication-Warning: bingsun1.cc.binghamton.edu: bf20761 owned process doing -bs Date: Tue, 13 Apr 1999 16:34:30 -0400 (EDT) From: zhihuizhang X-Sender: bf20761@bingsun1 To: freebsd-hackers@FreeBSD.ORG Subject: malloc() in libc vs. sbrk() Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In file mkfs.c, I find that the program uses the following sequence of system/library calls instead of a simple malloc() in libc to allocate memory: getpagesize() -> getrlimit() -> sbrk() --> memset() Is there any particular reason for doing this? Any help is appreciated. -------------------------------------------------- | Zhihui Zhang, http://cs.binghamton.edu/~zzhang | | Dept. of Computer Science, SUNY at Binghamton | -------------------------------------------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message