On Wed, Apr 20, 2016 at 10:52:06AM +0200, Samuel Thibault wrote: > Here is the profiling for the new policy.
Impressive. And as often, this shows how actual measurement is so much better than guessing :). > Most of the time, these are contiguous, so it's kind of stupid to look > again at each and every of them to find room. I guess we can introduce > a much better algorithm, by maintaining pointers to the free areas. I wrote an incomplete vm_map_enter in X15 [1] that should be helpful. In addition to a free hint pointer, it uses the red-black tree, making all allocations at worst O(n). If anyone feels like doing that little task, enjoy yourself. Otherwise, I'll probably do it, when I have some time, as usual. -- Richard Braun [1] http://git.sceen.net/rbraun/x15.git/blob/HEAD:/vm/vm_map.c