This is the mail archive of the
mailing list for the glibc project.
Re: [PATCH] time: Avoid alignment gaps in __tzfile_read
* Florian Weimer:
> * Paul Eggert:
>> Florian Weimer wrote:
>>> By ordering the suballocations by decreasing alignment, alignment
>>> gaps can be avoided.
>>> ... In the 8-byte case, two reads are now needed because the
>>> transitions and type indexes are no longer adjacent.
>> Is the idea to slightly decrease the amount of memory used, at the
>> expense of a slight increase in CPU time because of the two fread
> Essentially yes.
>> If so, I don't see the benefit of the change; usually we'd
>> rather save CPU time even if a bit more memory is used.
> It also simplifies the code because it removes one of the cases that
> depends on trans_width.
Sorry, I misread what you wrote. This is a long-term allocation, and
the reading of the file happens only once per allocation, so I do think
that the additional __fread_unlocked call is not a problem from a