Avoid importing memory aligned malloc (#1442)

We deprecate the usage of classic malloc and free, but under certain
circumstances they might get imported from intrinsics. The original
thought is we should just override malloc and free to use zmalloc and
zfree, but I think we should continue to deprecate it to avoid
accidental imports of allocations.

Closes https://github.com/valkey-io/valkey/issues/1434.

---------

Signed-off-by: Madelyn Olson <madelyneolson@gmail.com>
This commit is contained in:
Madelyn Olson 2024-12-14 10:13:04 -08:00 committed by GitHub
parent 7d72fada2c
commit 3cd176dc39
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -36,6 +36,9 @@
#include <math.h>
#ifdef HAVE_AVX2
/* Define __MM_MALLOC_H to prevent importing the memory aligned
* allocation functions, which we don't use. */
#define __MM_MALLOC_H
#include <immintrin.h>
#endif