Skip to content

Commit

Permalink
Updated the comments on resetwatermarks (#33309)
Browse files Browse the repository at this point in the history
  • Loading branch information
Thirsrin authored May 6, 2024
1 parent 3c5b92c commit c4e37c2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/platform/Linux/DiagnosticDataProviderImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,8 @@ CHIP_ERROR DiagnosticDataProviderImpl::ResetWatermarks()
// If implemented, the server SHALL set the value of the CurrentHeapHighWatermark attribute to the
// value of the CurrentHeapUsed.

// On Linux, the write operation is non-op since we always rely on the mallinfo system
// function to get the current heap memory.
// Get the current amount of heap memory, in bytes, that are being used by
// the current running program and reset the max heap high watermark to current heap amount.
struct mallinfo mallocInfo = mallinfo();
maxHeapHighWatermark = mallocInfo.uordblks;

Expand Down

0 comments on commit c4e37c2

Please sign in to comment.