Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 Aug 1997 12:42:23 +0930
From:      Greg Lehey <grog@lemis.com>
To:        Joerg Wunsch <joerg_wunsch@uriah.heep.sax.de>
Cc:        "hackers@freebsd.org" <hackers@FreeBSD.ORG>, Mike Burgett <mburgett@awen.com>
Subject:   Re: special malloc needs...
Message-ID:  <19970826124223.62337@lemis.com>
In-Reply-To: <19970825222008.PD53308@uriah.heep.sax.de>; from J Wunsch on Mon, Aug 25, 1997 at 10:20:08PM %2B0200
References:  <199708251630.JAA18241@dragon.awen.com> <19970825222008.PD53308@uriah.heep.sax.de>

next in thread | previous in thread | raw e-mail | index | archive | help
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).

> What the h*ck would you need this in a userland program?

Good question.  It sounds like a bad practice to me.

Greg



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19970826124223.62337>