]> git.ipfire.org Git - thirdparty/openssl.git/commit
Move OPENSSL_SMALL_FOOTPRINT-related logic from aligned_alloc to the only caller
authorEugene Syromiatnikov <esyr@openssl.org>
Mon, 18 Aug 2025 11:38:56 +0000 (13:38 +0200)
committerNeil Horman <nhorman@openssl.org>
Tue, 16 Sep 2025 13:59:13 +0000 (09:59 -0400)
commit1be238a9721d172b611983b9638be475b8421b51
tree1961dfcec9781c3a774173e05feb1069931fe929
parentfb567ac358682a5549810ff454c8d2c2356f9312
Move OPENSSL_SMALL_FOOTPRINT-related logic from aligned_alloc to the only caller

Originally, CRYPTO_aligned_alloc() returned NULL if OpenSSL was built
with OPENSSL_SMALL_FOOTPRINT defined, which is a weird place for such
a consideration;  moreover it means that every caller requires to
implement some form of a fallback (and manually over-allocate
and then align the returned memory if the alignment is a requirement),
which is counter-productive (and outright ridiculous in environments
with posix_memalign() available).  Move the OPENSSL_SMALL_FOOTPRINT
consideration to the only current caller and update the documentation
and tests accordingly.

Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28295)
crypto/hashtable/hashtable.c
crypto/mem.c
doc/man3/OPENSSL_malloc.pod
test/mem_alloc_test.c