shared memory reguion - HP UX

This is a discussion on shared memory reguion - HP UX ; Hi, I want to map a file to specific memory location and attach that to my proccess, i tried with mmap but i failed because i am requesting a specific memory location( 0Xe0000000) i tried with a gnu library function ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: shared memory reguion

  1. shared memory reguion

    Hi,
    I want to map a file to specific memory location and attach
    that to my proccess,
    i tried with mmap but i failed because i am requesting a specific
    memory location( 0Xe0000000)

    i tried with a gnu library function mmalloc ( libmmalloc.so )

    but i failed both times

    I would like to know the region which is fit for maping

    Best Regards,
    Rakesh UV


  2. Re: shared memory reguion

    Rakesh UV wrote:
    > Hi,
    > I want to map a file to specific memory location and attach
    > that to my proccess,
    > i tried with mmap but i failed because i am requesting a specific
    > memory location( 0Xe0000000)
    >
    > i tried with a gnu library function mmalloc ( libmmalloc.so )
    >
    > but i failed both times
    >
    > I would like to know the region which is fit for maping



    If you're making a MAP_SHARED mmap object, you have to be running
    as a Mostly Private Address Space model (MPAS). This is only available
    on IPF systems, 11.23 and higher. It is not (and can not be) supported
    on PA systems. For anything other than MPAS, you can not specify the
    virtual address on shared object creation (because you have absolutely
    no control over the shared address space which is system-wide, not
    per-process).

    So either use MPAS, map the file private [if you don't need any changes
    you make visible in the file]... or just let the system put it where
    it wants to.

    Don

+ Reply to Thread