From owner-freebsd-hackers Mon Aug 25 22:20:48 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id WAA09089 for hackers-outgoing; Mon, 25 Aug 1997 22:20:48 -0700 (PDT) Received: from alpo.whistle.com (alpo.whistle.com [207.76.204.38]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id WAA09084 for ; Mon, 25 Aug 1997 22:20:45 -0700 (PDT) Received: (from daemon@localhost) by alpo.whistle.com (8.8.5/8.8.5) id WAA22553; Mon, 25 Aug 1997 22:13:53 -0700 (PDT) Received: from current1.whistle.com(207.76.205.22) via SMTP by alpo.whistle.com, id smtpd022548; Tue Aug 26 05:13:44 1997 Date: Mon, 25 Aug 1997 22:13:35 -0700 (PDT) From: Julian Elischer To: Greg Lehey cc: Mike Smith , Joerg Wunsch , "hackers@freebsd.org" , Mike Burgett Subject: Re: special malloc needs... In-Reply-To: <19970826133233.19386@lemis.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk There is only one way I can think of doing what is requested.. write a silly little pseudo device that allocates a couple of meg of physical contig ram at startup mmap it into your address space.. On Tue, 26 Aug 1997, Greg Lehey wrote: > On Tue, Aug 26, 1997 at 01:22:50PM +0930, Mike Smith wrote: > >> On Mon, Aug 25, 1997 at 10:20:08PM +0200, J Wunsch wrote: > >>> As Mike Burgett wrote: > >>> > >>>> Is there any way to malloc memory (from userland code) that is at > >>>> specific offsets from each other in physical memory (i.e. 2 chunks > >>>> exactly XXM apart in physical RAM) or failing that, to allocate a > >>>> very large (>32M) chunk of contig physical RAM? (again, from > >>>> userland?) > >>> > >>> No, you can't do this. You get virtual memory, nothing else. It's > >>> not even backed with physical memory at all when you've got it. > >> > >> Well, you can't malloc() it, but you can try to mmap() it with > >> MAP_FIXED. man mmap(2). > > > > This only gives you a fixed _virtual_ address. > > Yes, it does. That's what I thought he wanted. Re-reading the > original message, I see I was wrong. Mike (B), whatever do you want > to allocate physical memory for? > > Greg >