On 11/5/12 5:49 PM, Minchan Kim wrote:
Also, memory allocators have a second motivation in using madvise: to
create virtually contiguous regions of memory from a fragmented address
space, without increasing the RSS.
I don't get it. How do we create contiguos region by madvise?
Just out of curiosity.
Could you elaborate that use case? :)
By using a new anonymous map and faulting pages in.
The fragmented virtual memory is released via MADV_DONTNEED and if the
malloc/free activity on the system is dominated by one process, chances
are that the newly faulted in page is the one released by the same
process :)
The net effect is that physical pages within a single address space are
rearranged so larger allocations can be satisfied.
-Arun
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>