File tree 1 file changed +12
-0
lines changed
1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -218,28 +218,39 @@ DiagnosticDataProviderImpl & DiagnosticDataProviderImpl::GetDefaultInstance()
218
218
219
219
CHIP_ERROR DiagnosticDataProviderImpl::GetCurrentHeapFree (uint64_t & currentHeapFree)
220
220
{
221
+ #ifndef __GLIBC__
222
+ return CHIP_ERROR_NOT_IMPLEMENTED;
223
+ #else
221
224
struct mallinfo mallocInfo = mallinfo ();
222
225
223
226
// Get the current amount of heap memory, in bytes, that are not being utilized
224
227
// by the current running program.
225
228
currentHeapFree = mallocInfo.fordblks ;
226
229
227
230
return CHIP_NO_ERROR;
231
+ #endif
228
232
}
229
233
230
234
CHIP_ERROR DiagnosticDataProviderImpl::GetCurrentHeapUsed (uint64_t & currentHeapUsed)
231
235
{
236
+ #ifndef __GLIBC__
237
+ return CHIP_ERROR_NOT_IMPLEMENTED;
238
+ #else
232
239
struct mallinfo mallocInfo = mallinfo ();
233
240
234
241
// Get the current amount of heap memory, in bytes, that are being used by
235
242
// the current running program.
236
243
currentHeapUsed = mallocInfo.uordblks ;
237
244
238
245
return CHIP_NO_ERROR;
246
+ #endif
239
247
}
240
248
241
249
CHIP_ERROR DiagnosticDataProviderImpl::GetCurrentHeapHighWatermark (uint64_t & currentHeapHighWatermark)
242
250
{
251
+ #ifndef __GLIBC__
252
+ return CHIP_ERROR_NOT_IMPLEMENTED;
253
+ #else
243
254
struct mallinfo mallocInfo = mallinfo ();
244
255
245
256
// The usecase of this function is embedded devices,on which we would need to intercept
@@ -252,6 +263,7 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetCurrentHeapHighWatermark(uint64_t & cu
252
263
currentHeapHighWatermark = mallocInfo.uordblks ;
253
264
254
265
return CHIP_NO_ERROR;
266
+ #endif
255
267
}
256
268
257
269
CHIP_ERROR DiagnosticDataProviderImpl::GetThreadMetrics (ThreadMetrics ** threadMetricsOut)
You can’t perform that action at this time.
0 commit comments