Re: patch for mmap MAP_ANON|MAP_SHARED

From: Jamie Lokier (lk@tantalophile.demon.co.uk)
Date: Sat Apr 22 2000 - 11:45:22 EDT

  • Next message: Terry Katz: "Memory + FileSystem issue (2.3.99-preX)?"

    Christoph Rohland wrote:
    > > Btw, even for MAP_ANON|MAP_SHARED, the filename reported via
    > > "cat /proc/pid/maps" will show up as /dev/zero (I _think_), did
    > > you want to change that?
    >
    > No, the I think the current behaviour is fine since mmap /dev/zero and
    > mmmap MAP_ANON are semantically the same. So they can just show up the
    > same.

    I think in both cases, for MAP_SHARED, it should show a shmfs file
    name if possible (i.e. if it's mounted).

    From /proc/pid/maps, it's possible to open the shared mapped file whose
    name is listed and see what the process sees. But that breaks for
    /dev/zero as a very special case. Using the shmfs name would remove
    that special case.

    -- Jamie

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.rutgers.edu
    Please read the FAQ at http://www.tux.org/lkml/



    This archive was generated by hypermail 2b29 : Sat Apr 22 2000 - 11:51:48 EDT