willmanduran / libtrm
PublicAn ultra thin C library to check real RAM program usage, down to the byte.
libtrm is a lightweight, single-header C library for Linux that reads detailed process memory metrics like unique, proportional, and resident set sizes from system files.
How It Works
While debugging why your program uses so much memory, you find this simple tool that gives clearer breakdowns than basic stats.
Download the single header file and place it right into your project's folder, no extra setup needed.
In one of your code files, add a quick note before including the file to wake up its measuring powers.
Include the file in your program and use its easy function to fetch detailed memory numbers whenever you want.
Build and launch your program as usual, and it now shares precise memory details on demand.
Enjoy seeing exactly how much memory is unique to your program, shared with others, and total—helping you optimize effortlessly.
Star Growth
Repurpose is a Pro feature
Generate ready-to-use prompts for X threads, LinkedIn posts, blog posts, YouTube scripts, and more -- with full repo context baked in.
Unlock RepurposeSimilar repos coming soon.