[uClinux-dev] how to use mmap()

David Howells dhowells at redhat.com
Fri Aug 5 05:38:56 EDT 2005

Hao Chen <chenhao_no3 at yahoo.com.cn> wrote:

> mmap( ( void *) 0x12345,
>            10,
>            PROT_READ | PROT_WRITE,
>            MAP_SHARED,
>            iFd,
>            0);

That's not permitted. The address must be page aligned.

Not only that, but if you're using an MMU-less system, then you're generally
not permitted to nominate your own address because the kernel's memory
allocator can't easily make that range of addresses available.


More information about the uClinux-dev mailing list