willmanduran

An ultra thin C library to check real RAM program usage, down to the byte.

10
1
100% credibility
Found Apr 27, 2026 at 10 stars -- GitGems finds repos before they trend. Get early access to the next one.
Sign Up Free
AI Analysis
C
AI Summary

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

1
🔍 Discover libtrm

While debugging why your program uses so much memory, you find this simple tool that gives clearer breakdowns than basic stats.

2
📥 Grab the file

Download the single header file and place it right into your project's folder, no extra setup needed.

3
Activate in your code

In one of your code files, add a quick note before including the file to wake up its measuring powers.

4
💻 Call for memory info

Include the file in your program and use its easy function to fetch detailed memory numbers whenever you want.

5
▶️ Run your program

Build and launch your program as usual, and it now shares precise memory details on demand.

📊 Get clear insights

Enjoy seeing exactly how much memory is unique to your program, shared with others, and total—helping you optimize effortlessly.

Sign up to see the full architecture

4 more

Sign Up Free

Star Growth

See how this repo grew from 10 to 10 stars Sign Up Free
Repurpose This Repo

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 Repurpose
AI-Generated Review

What is libtrm?

libtrm is an ultra thin C library for Linux that delivers precise process RAM metrics down to the byte, pulling USS for private memory, PSS for proportional shares, and RSS for baseline comparison. It solves the RSS flaw where shared libraries get overcounted across processes, giving you the real physical RAM your app claims. Drop the single-header into any C project for instant access via a simple API call like trm_get_memory().

Why is it gaining traction?

Unlike heavy profilers or shell hacks parsing /proc manually, libtrm is zero-dependency and STB-style: include once for implementation, use anywhere. Developers grab it for its byte-level accuracy on USS—crucial for spotting true leaks—without context-switch overhead in loops. In a world of bloated tools, this ultra thin approach hooks C devs chasing lean memory insights, akin to an ultra thin iPhone case for your binary.

Who should use this?

Linux C developers tuning daemons, embedded apps, or games needing USS to measure private RAM bloat. Server-side folks debugging container footprints or CLI tool authors tracking PSS in production. Skip if you're on non-Linux or need cross-platform; it's for kernel-proc purists optimizing byte by byte.

Verdict

Grab libtrm for quick, accurate Linux memory checks in C projects—its clean API and metrics beat RSS alone. With just 10 stars and 1.0% credibility score, it's early-stage but well-doc'd; test thoroughly before prod use.

(178 words)

Sign up to read the full AI review Sign Up Free

Similar repos coming soon.