Wait, I got mixed up, and it's past the 2 hour editing window. 40MB is the ram footprint of Gitea, which is written in Go. Fossil is a lot smaller, like 2MB IIRC. It has been a while since I played with it. It is basically a small C framework wrapped around a bunch of SQL scripts that run in an embedded copy of sqlite.