From owner-freebsd-hackers Fri Dec 12 08:17:16 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id IAA00922 for hackers-outgoing; Fri, 12 Dec 1997 08:17:16 -0800 (PST) (envelope-from owner-freebsd-hackers) Received: from ns.tar.com (ns.tar.com [204.95.187.2]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id IAA00915 for ; Fri, 12 Dec 1997 08:17:06 -0800 (PST) (envelope-from lists@tar.com) Received: from ppro.tar.com (ppro.tar.com [204.95.187.9]) by ns.tar.com (8.8.7/8.8.7) with SMTP id KAA06873 for ; Fri, 12 Dec 1997 10:17:03 -0600 (CST) Message-Id: <199712121617.KAA06873@ns.tar.com> From: "Richard Seaman, Jr." To: "freebsd-hackers@freebsd.org" Date: Fri, 12 Dec 97 10:17:02 -0500 Reply-To: "Richard Seaman, Jr." Priority: Normal X-Mailer: PMMail 1.92 For OS/2 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Subject: Virtual Memory Question Sender: owner-freebsd-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk If I allocate memory using either malloc or mmap, how do I know if the address handle I get back can be mapped to physical backing of some sort (RAM or swap)? For example, I have a machine with 16MB RAM and 64MB swap. Using malloc, I can malloc just about 128MB. Obviously, thats more than I can get physical backing for. Trying to access it all terminates the process, as would be expected. For mmap (MAP_ANON with fd -1), I can "allocate" virtual memory totalling over 3GB. Same problem. Or, am I just supposed to be smart enough to not grab too much memory? Thanks.