[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Controlling allocation in 64-bit space

Basile STARYNKEVITCH <basile@starynkevitch.net> writes:

> Le Fri, Mar 24, 2006 at 04:24:46PM +0800, Davyd Madeley écrivait/wrote:
>> Quoting Goswin von Brederlow <brederlo@informatik.uni-tuebingen.de>:
>> >mmap /dev/zero, that way you can pick the address you want.
> I suggest more precisely to 
>    mmap((void*)0, (size_t)size, PROT_READ|PROT_WRITE, 
>         MAP_PRIVATE|MAP_ANONYMOUS, (int)-1 /*no fd*/, (off_t)0)
> with MAP_ANONYMOUS you don't need to open /dev/zero (but internally it is
> the same)
> Regards

Is that protable or just a linux speciality?


Reply to: