diff options
author | Eugene Uriev <eugeneuriev@gmail.com> | 2024-03-31 23:03:23 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2024-04-12 16:23:06 -0600 |
commit | ae838768d79cbb834c4a8a5f4810df373e58b622 (patch) | |
tree | ad65d99ccd7aac92d665f337bd13ef3d73943faa /common/dlmalloc.c | |
parent | 151493a875071448e2582489f6fa84d1630b3368 (diff) | |
download | u-boot-ae838768d79cbb834c4a8a5f4810df373e58b622.tar.gz |
mcheck: support memalign
Signed-off-by: Eugene Uriev <eugeneuriev@gmail.com>
Diffstat (limited to 'common/dlmalloc.c')
-rw-r--r-- | common/dlmalloc.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/common/dlmalloc.c b/common/dlmalloc.c index 8de15d71932..73c04af2a36 100644 --- a/common/dlmalloc.c +++ b/common/dlmalloc.c @@ -2265,7 +2265,12 @@ Void_t *rEALLOc(Void_t *oldmem, size_t bytes) Void_t *mEMALIGn(size_t alignment, size_t bytes) { - return NULL; + size_t fullsz = mcheck_memalign_prehook(alignment, bytes); + void *p = mEMALIGn_impl(alignment, fullsz); + + if (!p) + return p; + return mcheck_memalign_posthook(alignment, p, bytes); } // pvALLOc, vALLOc - redirect to mEMALIGn, defined here, so they need no wrapping. |