[lkml]   [2011]   [Mar]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Subjectremap_file_pages doesn't like MAP_ANONYMOUS (but used to?)
      In older kernels (2.6.15-2.6.18?) I was able to make an anonymous mapping and remap part of it back over itself to create a circular buffer:
      p = mmap(0, sz, PROT_READ | PROT_WRITE, MAP_SHARED | MAP_ANONYMOUS, -1, 0)
      remap_file_pages(p + sz/2, sz/2, 0/*prot*/, 0/*offset*/, 0/*flags*/)

    I find the same method fails with EINVAL on the remap_file_pages call in 2.6.35/38. Making a dummy file or shared memory object works, but seems a bit more messy.

    Why drop support for ANONYMOUS? Is there another way to get the same effect?


    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2011-03-17 07:05    [W:0.020 / U:4.624 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site