Browse code

core: mem - define mem_counter struct in meminfo

- it is the same for f/q/tlsf mallocs

Daniel-Constantin Mierla authored on 09/09/2020 15:50:24
Showing 4 changed files
... ...
@@ -241,17 +241,5 @@ void fm_sums(void* qmp);
241 241
 void fm_mod_get_stats(void* qm, void **fm_root);
242 242
 void fm_mod_free_stats(void *root);
243 243
 
244
-typedef struct _mem_counter{
245
-	const char *file;
246
-	const char *func;
247
-	const char *mname;
248
-	unsigned long line;
249
-
250
-	unsigned long size;
251
-	int count;
252
-
253
-	struct _mem_counter *next;
254
-} mem_counter;
255
-
256 244
 #endif
257 245
 #endif
... ...
@@ -42,5 +42,17 @@ struct mem_info{
42 42
 	unsigned long total_frags; /** number of total memory fragments */
43 43
 };
44 44
 
45
+typedef struct _mem_counter{
46
+	const char *file;
47
+	const char *func;
48
+	const char *mname;
49
+	unsigned long line;
50
+
51
+	unsigned long size;
52
+	int count;
53
+
54
+	struct _mem_counter *next;
55
+} mem_counter;
56
+
45 57
 #endif
46 58
 
... ...
@@ -174,17 +174,5 @@ void qm_sums(void* qm);
174 174
 void qm_mod_get_stats(void *qm, void **qm_root);
175 175
 void qm_mod_free_stats(void *root);
176 176
 
177
-typedef struct _mem_counter{
178
-	const char *file;
179
-	const char *func;
180
-	const char *mname;
181
-	unsigned long line;
182
-
183
-	unsigned long size;
184
-	int count;
185
-
186
-	struct _mem_counter *next;
187
-} mem_counter;
188
-
189 177
 #endif
190 178
 #endif
... ...
@@ -89,18 +89,6 @@ unsigned long tlsf_available(tlsf_t pool);
89 89
 void tlsf_mod_get_stats(tlsf_t pool, void **root);
90 90
 void tlsf_mod_free_stats(void *root);
91 91
 
92
-typedef struct _mem_counter{
93
-	const char *file;
94
-	const char *func;
95
-	const char *mname;
96
-	unsigned long line;
97
-
98
-	unsigned long size;
99
-	int count;
100
-
101
-	struct _mem_counter *next;
102
-} mem_counter;
103
-
104 92
 #if defined(__cplusplus)
105 93
 };
106 94
 #endif