From owner-freebsd-questions Tue Sep 9 16:15:58 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id QAA14379 for questions-outgoing; Tue, 9 Sep 1997 16:15:58 -0700 (PDT) Received: from freebie.lemis.com (gregl1.lnk.telstra.net [139.130.136.133]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id QAA14366 for ; Tue, 9 Sep 1997 16:15:50 -0700 (PDT) Received: (from grog@localhost) by freebie.lemis.com (8.8.7/8.8.5) id IAA18655; Wed, 10 Sep 1997 08:45:35 +0930 (CST) Message-ID: <19970910084535.11505@lemis.com> Date: Wed, 10 Sep 1997 08:45:35 +0930 From: Greg Lehey To: Joe McGuckin Cc: questions@freebsd.org Subject: Re: /: file system is full References: <199709091717.KAA29928@monk.via.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.81e In-Reply-To: <199709091717.KAA29928@monk.via.net>; from Joe McGuckin on Tue, Sep 09, 1997 at 10:17:37AM -0700 Organisation: LEMIS, PO Box 460, Echunga SA 5153, Australia Phone: +61-8-8388-8250 Fax: +61-8-8388-8250 Mobile: +61-41-739-7062 WWW-Home-Page: http://www.lemis.com/~grog Fight-Spam-Now: http://www.cauce.org Sender: owner-freebsd-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk On Tue, Sep 09, 1997 at 10:17:37AM -0700, Joe McGuckin wrote: > > I was trying to cause my system to crash. So, I thought that I'd use up all > the available memory. > > I wrote a simple 'C' program to malloc a 1 MB chunk, then write into it to > insure that the paged were allocated > > while(1){ > p = (char *) malloc(1024*1024); > *p = '1'; > } This will only allocate the first page. *p is the same thing as p [0]. To allocate all pages, you need to loop through at offsets of 4096. > Very quickly, I get back a msg about "/: file system full" > > What going on here? Good question. Where's your swap? Greg