#include <mapmem.h>
#include <asm/global_data.h>
#include <asm/io.h>
+#include <valgrind/valgrind.h>
DECLARE_GLOBAL_DATA_PTR;
return ptr;
log_debug("%lx\n", (ulong)ptr);
+ VALGRIND_MALLOCLIKE_BLOCK(ptr, bytes, 0, false);
return ptr;
}
if (!ptr)
return ptr;
log_debug("aligned to %lx\n", (ulong)ptr);
+ VALGRIND_MALLOCLIKE_BLOCK(ptr, bytes, 0, false);
return ptr;
}
return ptr;
}
+
+#if IS_ENABLED(CONFIG_VALGRIND)
+void free_simple(void *ptr)
+{
+ VALGRIND_FREELIKE_BLOCK(ptr, 0);
+}
+#endif
#endif
void malloc_simple_info(void)