Date: Mon, 25 Aug 1997 22:13:35 -0700 (PDT) From: Julian Elischer <julian@whistle.com> To: Greg Lehey <grog@lemis.com> Cc: Mike Smith <mike@smith.net.au>, Joerg Wunsch <joerg_wunsch@uriah.heep.sax.de>, "hackers@freebsd.org" <hackers@FreeBSD.ORG>, Mike Burgett <mburgett@awen.com> Subject: Re: special malloc needs... Message-ID: <Pine.BSF.3.95.970825221211.8912E-100000@current1.whistle.com> In-Reply-To: <19970826133233.19386@lemis.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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 >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.95.970825221211.8912E-100000>