ref: 7b3b9a6619e2247061e433a7a5269056720e727f
parent: 2577ef35e81f7e8064cf8dd5c23c44efe1407dc5
author: Michał Majewicz <[email protected]>
date: Fri Aug 19 08:31:13 EDT 2016
ext4: malloc substitution - moved option definition and changed names
--- a/include/ext4_config.h
+++ b/include/ext4_config.h
@@ -149,6 +149,13 @@
#ifndef CONFIG_UNALIGNED_ACCESS
#define CONFIG_UNALIGNED_ACCESS 0
#endif
+
+/**@brief Switches use of malloc/free functions family
+ * from standard library to user provided*/
+#ifndef CONFIG_USE_USER_MALLOC
+#define CONFIG_USE_USER_MALLOC 0
+#endif
+
#ifdef __cplusplus
}
#endif
--- a/include/ext4_types.h
+++ b/include/ext4_types.h
@@ -1005,12 +1005,12 @@
#endif
-#ifdef USE_OTHER_MALLOC
+#if CONFIG_USE_USER_MALLOC
-#define ext4_malloc pool_malloc
-#define ext4_calloc pool_calloc
-#define ext4_realloc pool_realloc
-#define ext4_free pool_free
+#define ext4_malloc user_malloc
+#define ext4_calloc user_calloc
+#define ext4_realloc user_realloc
+#define ext4_free user_free
#else