Skip to content

Instantly share code, notes, and snippets.

View AyomideA-S's full-sized avatar
⚕️
Self-developing

Ayomide Ayodele-Soyebo AyomideA-S

⚕️
Self-developing
View GitHub Profile
@AyomideA-S
AyomideA-S / memory_check.cpp
Created February 14, 2022 17:00 — forked from thirdwing/memory_check.cpp
C++ code to print out runtime memory usage
#include <iostream>
#include <fstream>
#include <unistd.h>
void process_mem_usage(double& vm_usage, double& resident_set)
{
vm_usage = 0.0;
resident_set = 0.0;
// the two fields we want