CCIMXDesktop
 
Loading...
Searching...
No Matches
MemoryInfoFetcher Class Reference

The MemoryInfoFetcher class Provides memory usage information in a platform-independent manner. Acts as a memory information fetcher interface. More...

#include <MemoryInfoFetcher.h>

Inheritance diagram for MemoryInfoFetcher:

Classes

struct  MemoryStat
 The MemoryStat struct Holds memory statistics at the byte level. More...
 

Signals

void finish_detect_memory (const MemoryInfoFetcher::MemoryStat &mem_stat)
 finish_detect_memory Signal emitted when memory information is updated.
 

Public Member Functions

 MemoryInfoFetcher (QObject *parent=nullptr)
 Constructor with optional parent.
 
 ~MemoryInfoFetcher ()
 Destructor to clean up resources.
 
 Q_DISABLE_COPY (MemoryInfoFetcher)
 disable copy
 
void set_flush_freq (const int msecs)
 set_flush_freq Sets the frequency in milliseconds at which memory info is refreshed.
 
void set_capture_state (bool st)
 set_capture_state Enables or disables memory information capturing.
 

Static Public Member Functions

static QString format_size (quint64 size)
 format_size Utility function to format byte size into human-readable string.
 

Public Attributes

struct MemoryInfoFetcher::MemoryStat mem_stat
 memory stat holder
 

Detailed Description

The MemoryInfoFetcher class Provides memory usage information in a platform-independent manner. Acts as a memory information fetcher interface.

Constructor & Destructor Documentation

◆ MemoryInfoFetcher()

MemoryInfoFetcher::MemoryInfoFetcher ( QObject *  parent = nullptr)
explicit

Constructor with optional parent.

Parameters
parentPointer to the QObject parent, default is nullptr.

Member Function Documentation

◆ finish_detect_memory

void MemoryInfoFetcher::finish_detect_memory ( const MemoryInfoFetcher::MemoryStat mem_stat)
signal

finish_detect_memory Signal emitted when memory information is updated.

Parameters
mem_statCurrent memory statistics.

◆ format_size()

QString MemoryInfoFetcher::format_size ( quint64  size)
static

format_size Utility function to format byte size into human-readable string.

Parameters
sizeSize in bytes.
Returns
Formatted size string.

◆ set_capture_state()

void MemoryInfoFetcher::set_capture_state ( bool  st)

set_capture_state Enables or disables memory information capturing.

Parameters
stTrue to start capturing, false to stop.

◆ set_flush_freq()

void MemoryInfoFetcher::set_flush_freq ( const int  msecs)
inline

set_flush_freq Sets the frequency in milliseconds at which memory info is refreshed.

Parameters
msecsFlush interval in milliseconds.

The documentation for this class was generated from the following files: