Skip to content

implement h_free_aligned_sized from the C standard & fixes align_val_t delete functions#313

Merged
thestinger merged 1 commit intoGrapheneOS:mainfrom
rdevshp:cpp_delete_fix
May 4, 2026
Merged

implement h_free_aligned_sized from the C standard & fixes align_val_t delete functions#313
thestinger merged 1 commit intoGrapheneOS:mainfrom
rdevshp:cpp_delete_fix

Conversation

@rdevshp
Copy link
Copy Markdown
Contributor

@rdevshp rdevshp commented Apr 21, 2026

This pull request implements the standard h_free_aligned_sized and wires the existing C++ align_val_t delete functions through h_free_aligned_sized.

Existing align_val_t delete functions don't properly consider the alignment parameter, and valid delete calls can fail with "sized deallocation mismatch". This fixes it.

@rdevshp rdevshp force-pushed the cpp_delete_fix branch 4 times, most recently from 61e6acc to b2aea60 Compare April 22, 2026 07:10
@rdevshp rdevshp mentioned this pull request Apr 22, 2026
@thestinger thestinger force-pushed the main branch 4 times, most recently from 9d5802c to 074d47a Compare April 24, 2026 14:53
Comment thread h_malloc.c Outdated
Comment thread h_malloc.c
@rdevshp rdevshp force-pushed the cpp_delete_fix branch 4 times, most recently from d870a7c to d46fda8 Compare May 4, 2026 11:20
@rdevshp rdevshp requested a review from thestinger May 4, 2026 11:23
@rdevshp
Copy link
Copy Markdown
Contributor Author

rdevshp commented May 4, 2026

I have made the requested changes.

@thestinger thestinger merged commit 9a44297 into GrapheneOS:main May 4, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants