]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
rtld_malloc: add __crt_aligned_alloc_offset()
authorKonstantin Belousov <kib@FreeBSD.org>
Sat, 22 Jul 2023 04:21:45 +0000 (07:21 +0300)
committerKonstantin Belousov <kib@FreeBSD.org>
Mon, 21 Aug 2023 14:16:42 +0000 (17:16 +0300)
commitc29ee08204ce4106d4992474005c5f2fb7d5fbf1
treea2c9d9c37a01596824053e1abf37de33ad95cc03
parentd60130bf32a3c35417f276507dcdfa569397dae3
rtld_malloc: add __crt_aligned_alloc_offset()

It is modelled after aligned_alloc(3).  Most importantly, to free the
allocation, __crt_free() can be used.  Additionally, caller may specify
offset into the aligned allocation, so that we return offset-ed from
alignment pointer.

Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D41150
libexec/rtld-elf/rtld_malloc.c
libexec/rtld-elf/rtld_malloc.h