File tree 3 files changed +8
-12
lines changed
3 files changed +8
-12
lines changed Original file line number Diff line number Diff line change 41
41
* Pre-processor Definitions
42
42
****************************************************************************/
43
43
44
- #if CONFIG_MM_DEFAULT_ALIGNMENT == 0
45
- # define MEMPOOL_ALIGN (2 * sizeof(uintptr_t))
46
- #else
47
- # define MEMPOOL_ALIGN CONFIG_MM_DEFAULT_ALIGNMENT
48
- #endif
49
-
50
44
#if CONFIG_MM_BACKTRACE >= 0
51
45
# define MEMPOOL_REALBLOCKSIZE (pool ) (ALIGN_UP((pool)->blocksize + \
52
46
sizeof(struct mempool_backtrace_s), \
53
- MEMPOOL_ALIGN ))
47
+ MM_ALIGN ))
54
48
#else
55
49
# define MEMPOOL_REALBLOCKSIZE (pool ) ((pool)->blocksize)
56
50
#endif
Original file line number Diff line number Diff line change 156
156
# define MM_DUMP_LEAK (dump ,pid ) (false)
157
157
#endif
158
158
159
+ #if CONFIG_MM_DEFAULT_ALIGNMENT == 0
160
+ # define MM_ALIGN (2 * sizeof(uintptr_t))
161
+ #else
162
+ # define MM_ALIGN CONFIG_MM_DEFAULT_ALIGNMENT
163
+ #endif
164
+
159
165
#define MM_INIT_MAGIC 0xcc
160
166
#define MM_ALLOC_MAGIC 0xaa
161
167
#define MM_FREE_MAGIC 0x55
Original file line number Diff line number Diff line change 34
34
#include <nuttx/fs/procfs.h>
35
35
#include <nuttx/lib/math32.h>
36
36
#include <nuttx/mm/mempool.h>
37
+ #include <nuttx/mm/mm.h>
37
38
38
39
#include <assert.h>
39
40
#include <sys/types.h>
114
115
#define MM_MAX_CHUNK (1 << MM_MAX_SHIFT)
115
116
#define MM_NNODES (MM_MAX_SHIFT - MM_MIN_SHIFT + 1)
116
117
117
- #if CONFIG_MM_DEFAULT_ALIGNMENT == 0
118
- # define MM_ALIGN (2 * sizeof(uintptr_t))
119
- #else
120
- # define MM_ALIGN CONFIG_MM_DEFAULT_ALIGNMENT
121
- #endif
122
118
#define MM_GRAN_MASK (MM_ALIGN - 1)
123
119
#define MM_ALIGN_UP (a ) (((a) + MM_GRAN_MASK) & ~MM_GRAN_MASK)
124
120
#define MM_ALIGN_DOWN (a ) ((a) & ~MM_GRAN_MASK)
You can’t perform that action at this time.
0 commit comments