These fast helpers sometimes breach mem-chunk boundaries.
Thus they trigger mcheck alarm. Standard ones are accurate though.
Signed-off-by: Eugene Uriev <eugeneuriev@gmail.com>
#ifdef MCHECK_HEAP_PROTECTION
#define STATIC_IF_MCHECK static
+ #undef MALLOC_COPY
+ #undef MALLOC_ZERO
+static inline void MALLOC_ZERO(void *p, size_t sz) { memset(p, 0, sz); }
+static inline void MALLOC_COPY(void *dest, const void *src, size_t sz) { memcpy(dest, src, sz); }
#else
#define STATIC_IF_MCHECK
#define mALLOc_impl mALLOc