[lkml]   [2009]   [Jun]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectA question about using a private anonymous mmap
    I have a program which creates a reasonably large private anonymous map. 
    The program then writes into a few places in the map, but ends up reading
    from all of them.

    When I run this program on a system running the process only ever
    seems to use enough memory to hold the data that has actually been written
    (well - in units of PAGE_SIZE). When I run the program on a system
    running then as it reads the map the amount of memory used
    continues to increase until the complete map has actually been allocated
    (and since the total size is greater than the physically available RAM
    causes swapping). Basically I seem to be seeing copy-on-read instead of
    copy-on-write type behaviour.

    Is this an expected change, and is there any option I can tweak to get the
    old behaviour back?



    I can't die until the government finds a safe place to bury my liver.
    -- Phil Harris

     \ /
      Last update: 2009-06-04 19:25    [W:0.018 / U:51.144 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site