On 20 July 2012 14:00, Jakub Jermar <[email protected]> wrote:
> Hi Jiri,
>
> On 19.7.2012 20:48, Jiří Zárevúcky wrote:
>> Have you even figured out what is wrong with memalign()?
>
> Unfortunately, we have never really figured out what the underlying
> rootcause was and hence we didn't know what exactly needs to be fixed.
> This is partly because no one really cared enough for this particular bug.
>

Well, I did some digging yesterday (see the patch) and it would seem
that the calculation that was supposed to ensure big-enough grow was
not correct. Since the original area does not need to be aligned to
the requirement, one must either add the entire alignment size to
provide for the margin, or compute the needed addition based on
alignment of the end of the existing area. If that is not done, the
grow is successful, but allocation can't proceed because there is not
enough space to align it.
In my patch I basically do both in different cases, but I think the
latter is still not entirely correct and will sometimes extend more
than necessary.

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

Reply via email to