Change-Id: I3642a96c6ccab3c6c772f14ee369643166a8fbd8
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
%build
%if "%{asan}" == "1"
%restore_fcommon
+export CFLAGS="-DTIZEN_DISABLE_MEMORY_CHECK"
%endif
%if %{with debug}
export CFLAGS="-O0 -g3"
return posix_memalign(ptr, align, size);
}
+#ifndef TIZEN_DISABLE_MEMORY_CHECK
MRP_INIT static void menory_check_init()
{
mcheck(NULL);
}
+#endif
static void __passthru_free(void *ptr, const char *file, int line,
const char *func)
MRP_UNUSED(func);
if (ptr == NULL)
return;
-
+#ifdef TIZEN_DISABLE_MEMORY_CHECK
+ free(ptr);
+#else
if (mprobe(ptr) == MCHECK_OK)
free(ptr);
else {
mrp_log_warning("Invalid pointer passed to fuction free");
}
+#endif
}