summaryrefslogtreecommitdiff
path: root/common/dlmalloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/dlmalloc.c')
-rw-r--r--common/dlmalloc.c7
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.