Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/5/84; site wanginst.UUCP Path: utzoo!watmath!clyde!burl!ulysses!bellcore!decvax!wanginst!tupper From: tupper@wanginst.UUCP (John Tupper) Newsgroups: net.unix,net.unix-wizards Subject: Re: Maximum amount of allocatable Virtual memory Message-ID: <1827@wanginst.UUCP> Date: Sun, 6-Apr-86 14:52:31 EST Article-I.D.: wanginst.1827 Posted: Sun Apr 6 14:52:31 1986 Date-Received: Wed, 9-Apr-86 20:47:37 EST Reply-To: tupper@wanginst.UUCP (John Tupper) Organization: Wang Institute, Tyngsboro, Ma. 01879 Lines: 23 Keywords: Virtual Memory Xref: watmath net.unix:7566 net.unix-wizards:17491 >. . . Does anyone know of how to figure out the MAXIMUM >amount of virtual memory that can be allocated on ANY Unix machine? From my experience with 4.1 & 4.2bsd: The only sure fire way that I would know of is to allocate until an allocation fails (use a variation of the binary search to cut the number of allocates). There is a problem with allocating everything you can get your hands on however. Bsd will only allocate virtual memory if there is room in a swapping partition to hold the allocated memory. Thus, allocating all the virtual memory you can will fill the swapping partitions and seriously affect system performance. It would be impossible to run two copies of your program at once. Probably a better solution would be: 1) Allocate on the fly, but allocate in big chunks to reduce to number of allocates 2) Let the user specify the initial amount of memory to be used (possibly via an environment variable). -- John Tupper tupper@wanginst (Csnet) Wang Institute of Graduate Studies wanginst!tupper (UUCP) Tyng Road, Tyngsboro, MA 01879 (617) 649-9731