Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Dec 2000 11:07:43 -0600
From:      "G. Adam Stanislav" <adam@whizkidtech.net>
To:        Aled Morris <aledm@qix.co.uk>
Cc:        Stephen McKay <mckay@thehub.com.au>, hackers@FreeBSD.ORG
Subject:   Re: pipe
Message-ID:  <20001205110743.B228@whizkidtech.net>
In-Reply-To: <Pine.BSF.4.21.0012051535400.618-100000@kai.qix.co.uk>; from aledm@qix.co.uk on Tue, Dec 05, 2000 at 03:43:10PM %2B0000
References:  <20001205085645.A228@whizkidtech.net> <Pine.BSF.4.21.0012051535400.618-100000@kai.qix.co.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Dec 05, 2000 at 03:43:10PM +0000, Aled Morris wrote:
>malloc appears to mmap pages from fd -1, and makes them private and
>read/write (except on sparc architecture, where it uses /dev/zero rather
>than -1, which makes more sense to me)
>
>It isn't particularly complicated:
>
>newmem = mmap(0, size, PROT_READ|PROT_WRITE, MAP_ANON|MAP_PRIVATE, -1, 0);

Thanks, Aled. I'll play with it. Will try both -1 and /dev/zero.

Cheers,
Adam

-- 
Suppose you were an idiot.
Suppose you were a member of Congress.
But I'm repeating myself...
		-- Mark Twain


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




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