[PATCH] malloc: Cleanup sysmalloc_mmap
DJ Delorie
dj@redhat.com
Sat Aug 2 00:38:28 GMT 2025
Wilco Dijkstra <Wilco.Dijkstra@arm.com> writes:
> Cleanup sysmalloc_mmap - simplify alignment code since it is always a constant.
> Remove av parameter which is only used in do_check_chunk, but since it may be
> NULL for mmap, it will cause a crash in checking mode. Remove the odd check on
> mmap in do_check_chunk.
>
> Passes regress, OK for commit?
LGTM but for one minor thing...
Reviewed-by: DJ Delorie <dj@redhat.com>
> + size_t align = MALLOC_ALIGNMENT - CHUNK_HDR_SZ;
This is no longer an alignment (in the sense we use the term in
malloc.c), so a more appropriate name would be better. "padding",
perhaps?
More information about the Libc-alpha
mailing list