On Tue, Apr 26, 2011 at 9:33 AM, Otto Moerbeek <[email protected]> wrote:
> This diff implements a tradeoff to gain speed at the cost of reducing
> the randomness of chunk allocation in malloc slightly.
>
> The idea is only to randomize the first half of chunks in a page. The
> second half of chunks will fill in the gaps in-order. The
> effectiveness of the current randomization decreases already with the
> number of free slots diminishing in a page.
>
> In one test case, this diff reduced the runtime from 31s to 25s. I'm
> not completely sure if the reduced randomness is acceptable. But if

Perhaps a quarter?  We want to prevent adjacent consecutive
allocations, which is still very likely at the half way point, but
diminishes after that.

Reply via email to