Re: [Bug 207861] New: mremap MAP_ANONYMOUS|MAP_SHARED grow provide bad mapping.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi All,

Following up, I think I got the big picture with what you said, and then I think, that 'may be' there is no real use case for MAP__ANONYMOUS|MAP_SHARED, well I guess we can even say there is none otherwise they would have voiced long ago :) I got trapped into it in a multithreaded app trying to be smart and grow the regions that way :). I guess this could be closed with a simple little notice in the man page, eventually in the BUGS section, specifying that using mremap() on MAP_SHARED is not supported beside the virtual addr aliasing already mentioned. I got trapped after rereading again and again the fine manual, and thinking for a minute I must miss something.

Note that MAP__ANONYMOUS|MAP_SHARED works nicely, and this one is very useful to implement performant 'realloc' without copy for page (multipages) realloc, with all the precaution that no addr of the memory region got to be taken due to the vaddr migration potential, that's already mentioned in the man page.

So the fix is simply docco I guess :)

Cheers,
Phi



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux