From owner-freebsd-questions Mon Oct 13 04:10:17 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id EAA13510 for questions-outgoing; Mon, 13 Oct 1997 04:10:17 -0700 (PDT) (envelope-from owner-freebsd-questions) Received: from coal.nis.newscorp.com (mxa.newscorp.com [206.15.105.135]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id EAA13352 for ; Mon, 13 Oct 1997 04:08:30 -0700 (PDT) (envelope-from ben@multivac.narcissus.net) Received: from multivac.narcissus.net (ts1port1.port.net [207.38.248.1]) by coal.nis.newscorp.com (News Corp SMTP GW 1.1) with SMTP id HAA14972; Mon, 13 Oct 1997 07:09:46 -0400 (EDT) Received: from localhost by multivac.narcissus.net (NX5.67e/NX3.0S) id AA03207; Mon, 13 Oct 97 07:02:48 -0400 Date: Mon, 13 Oct 1997 07:02:48 -0400 (GMT-0400) From: Snob Art Genre Reply-To: benedict@echonyc.com To: Doug White Cc: Jason Alan Nordwick , questions@FreeBSD.ORG Subject: Re: more kernel/libc questions. In-Reply-To: Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk On Sun, 12 Oct 1997, Doug White wrote: > This bit on the brk(2) man page implies to me that they don't do anything > useful: % uname -a FreeBSD thorazine.neuron.net 2.2-STABLE FreeBSD 2.2-STABLE #0: Sun Aug 31 15:20:36 EDT 1997 root@thorazine.neuron.net:/usr/src/sys/compile/THORAZINE i386 % grep brk /usr/src/lib/libc/stdlib/malloc.c static void *malloc_brk; result = (caddr_t)pageround((u_long)sbrk(0)); if (brk(tail)) { malloc_brk = tail; malloc_origo = ((u_long)pageround((u_long)sbrk(0))) >> malloc_pageshift; * We can sbrk(2) further back when we keep this on a low address. if ((void*)pf->page >= (void*)sbrk(0)) wrterror("(ES): entry on free_list past brk\n"); pf->end == malloc_brk && /* ..and none behind us,*/ malloc_brk == sbrk(0)) { /* ..and it's OK to do...*/ brk(pf->end); malloc_brk = pf->end; > Doug White | University of Oregon > Internet: dwhite@resnet.uoregon.edu | Residence Networking Assistant > http://gladstone.uoregon.edu/~dwhite | Computer Science Major Ben "You have your mind on computers, it seems."