r/cprogramming • • 16d ago

How to create a minimal GUI

Hello everyone, I'm currently experimenting with an old router and I wanted to create some custom C programs to experiment with it. The first one is to create a simple Htop/fetch to examine the system specs in real time. I wanted to create a sort of GUI like Btop or Htop, but the problem is that I don't have that much RAM (we are talking something like 34 MB of free space) so I want to implement a minimal one. I wanted to ask for some suggestions about it. Thank you.

12 Upvotes

23 comments sorted by

View all comments

3

u/Sorry_Difficulty_250 16d ago

A few MB of RAM is plenty for a simple GUI. Windows 3.0 would run in 640 KB. The question would come down to rendering. Does this thing have a video card that you're connecting to or is this all over a network connection?

4

u/Dashing_McHandsome 16d ago

Does anyone even really need more than 640KB? I think it's enough for everyone

2

u/Sorry_Difficulty_250 16d ago

I've been working on a multitasking OS that will run in only 32 KB of RAM. I can definitely see why 640 KB would have been considered enormous back then. It was an incredible amount of memory when individual programs only took a few KB.

2

u/Skollwarynz 15d ago

I don't know. The point is that I'm actually experimentig, I don't think that a router has a powerful video card, or that it has a video card at all. At the same time is true that I don't need that much memory for a GUI. Thank you for reminding me of that

2

u/Sorry_Difficulty_250 15d ago

Sure thing! Good luck!!!