Defined in carb/extras/MemoryUsage.h

inline size_t carb::extras::getMemoryValueByName(const char *filename, const char *name, size_t nameLen = 0)

Retrieves a memory value by its key name in ‘/proc/meminfo’ or other.

  • filename[in] The name of the pseudo file to parse the information from. This may be nullptr to use the default of ‘/proc/meminfo’ instead.

  • name[in] The name of the key to search for. This may not be nullptr.

  • nameLen[in] The length of the key name in characters. If set to 0, the length of the string will be calculated.


The value associated with the given key name if found. Returns 0 otherwise.