Respect max_align_t (IDFGH-17761)#18686
Conversation
|
@ltowarek thanks for reporting the issue. I have reviewed the proposed changes and while it is true that the C/C++ standard deviation exists, I don't think this change is the right trade-off for ESP-IDF. TLSF's natural alignment granularity ( Several targets have TLSF baked into ROM and the ROM implementation has Routing every allocation through the memalign path imposes overhead on every user, not just those who need it:
This deviation has existed for years and this is the first report. The libraries affected — protobuf, abseil, OpenTelemetry — are heavyweight C++ frameworks that perform arena allocation with |
|
As a workaround, you can opt in to max_align_t alignment at the application level by overriding malloc/calloc/realloc in your project. |
Description
Align all pointers with max_align_t to match C/C++ specification.
Related
Fixes #18685
Testing
Checklist
Before submitting a Pull Request, please ensure the following: