On 07/20/2012 05:36 PM, Jiří Zárevúcky wrote:
> On 20 July 2012 16:55, Jiří Zárevúcky <[email protected]> wrote:
>> On 20 July 2012 16:36, Jakub Jermar <[email protected]> wrote:
>>>
>>> In your patch, why don't you simply add size and align in area_grow(),
>>> just as you do for the new areas?
>>>
>>
>> I wanted to avoid requesting more pages than necessary, but now that I
>> think about it, it probably doesn't really matter, does it?
>> What I find peculiar though is that growing the area always creates a
>> new free block, even if the previous block is free.
>> Seems to me like a completely unnecessary fragmentation.
> 
> There, my final iteration.
> I went back to just adding the alignment size regardless of whether
> it's necessary. Shouldn't matter much.
> What I kept is allocation directly after grow, and I modified
> area_grow() to append to the last block if possible.
> Feel free to ignore that last part if you wish, it just seemed to me
> like the right thing to do there.

Ok, pushed as mainline,1553. In mainline,1554, I pushed a fix for a
problem which was revealed by one of the asserts you added.

The problem was that on 32-bits, the logarithm of the maximum possible
alignment is 26. Bigger alignments, in combination with 16-byte base
alignment, make the lcm() computation overflow, which confuses the
allocator as it is not ready to deal with zero alignment.

Thanks for contributing the fixes and welcome back!

Jakub


_______________________________________________
HelenOS-devel mailing list
[email protected]
http://lists.modry.cz/cgi-bin/listinfo/helenos-devel

Reply via email to