This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
On 07/11/2016 04:35 AM, Carlos O'Donell wrote:
I agree with H.J. here, this should be MALLOC_ALIGNMENT, and if it's larger then so be it. It should logically match the behaviour, as best it can, of glibc's malloc since we're handing off most commonly to that malloc after relocation. Thus I'd like to see the behaviours harmonized. Other mallocs may not have the same behaviour but that's not a reason to avoid MALLOC_ALIGNMENT.
I'm still not convinced. Obviously, we cannot rely on MALLOC_ALIGNMENT anywhere because interposed mallocs may not provide it. So I still don't see the value of compatibility with the main malloc here.
The discussions about fixing libc malloc's alignment are out of scope for this change IMO. We should focus on fixing ld.so's behaviour. Out of curiosity have you tried to assemble a unit test for these functions based on linking directly with dl-minimal.os? It would be nice to run them through similar testing as is done by malloc. OK to checkin if you use MALLOC_ALIGMENT.
This change is not exactly trivial because it's currently defined in malloc/malloc.c only. I will need to post another version for review.
Thanks, Florian
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |