diff options
| author | Michał Majewicz <mmajewicz@users.noreply.github.com> | 2016-08-19 12:31:13 +0200 |
|---|---|---|
| committer | Michał Majewicz <mmajewicz@users.noreply.github.com> | 2016-08-19 12:31:13 +0200 |
| commit | 7b3b9a6619e2247061e433a7a5269056720e727f (patch) | |
| tree | e76c6645aa6e12380ba8b94ce4eae0c3b81017e2 /include | |
| parent | 2577ef35e81f7e8064cf8dd5c23c44efe1407dc5 (diff) | |
ext4: malloc substitution - moved option definition and changed names
Diffstat (limited to 'include')
| -rw-r--r-- | include/ext4_config.h | 7 | ||||
| -rw-r--r-- | include/ext4_types.h | 10 |
2 files changed, 12 insertions, 5 deletions
diff --git a/include/ext4_config.h b/include/ext4_config.h index 66f4c19..f42b6fc 100644 --- a/include/ext4_config.h +++ b/include/ext4_config.h @@ -149,6 +149,13 @@ extern "C" { #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 diff --git a/include/ext4_types.h b/include/ext4_types.h index 23ea900..dc1492c 100644 --- a/include/ext4_types.h +++ b/include/ext4_types.h @@ -1005,12 +1005,12 @@ struct jbd_sb { #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 |
