From owner-freebsd-hackers Fri Oct 8 13:37: 7 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by hub.freebsd.org (Postfix) with ESMTP id 74AB014A0D for ; Fri, 8 Oct 1999 13:37:04 -0700 (PDT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.9.3/8.9.3) id PAA76961; Fri, 8 Oct 1999 15:36:47 -0500 (CDT) (envelope-from dan) Date: Fri, 8 Oct 1999 15:36:47 -0500 From: Dan Nelson To: Mike Smith Cc: Zhihui Zhang , freebsd-hackers@FreeBSD.ORG Subject: Re: Questions regarding memory usage Message-ID: <19991008153647.A76552@dan.emsphone.com> References: <199910081910.MAA01047@dingo.cdrom.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre3i In-Reply-To: <199910081910.MAA01047@dingo.cdrom.com> X-OS: FreeBSD 4.0-CURRENT Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In the last episode (Oct 08), Mike Smith said: > > > > Does FreeBSD have the following features: > > > > (1) Limit the physical memory it uses even if the machine has larger > > memory without having to pull out the memory chip physically. This should > > be done at the boot time. > > In -current and (I think) -stable, you can set the 'hw.physmem' tunable > in the loader. See 'help set tunables' in the loader, or read > /boot/loader.help. > > > (2) Tell if a particular program has ever been swapped out. > > There is no trivial way to determine this, no. > The getrusage() function returns a structure with the follwing field in it: ru_nswap the number of times a process was swapped out of main memory. Would this do the trick? It only works for yourself or your child processes though. -- Dan Nelson dnelson@emsphone.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message