Huh? Windows 95, IIRC, will _refuse to even boot_ if you have more than 480Mb of RAM, let alone 4Gb.
Most machines of the time had 4Mb of RAM. Something seriously powerful had 16Mb.
As for running a modern 32bit Linux on something with minimal hardware... The creator of "uARM" [0] says that it's useable, and it uses a "30-pin 16MB SIMM" piece of RAM. But honestly, the speed of the RAM is more important than the size, for that project.
[0] https://dmitry.gr/index.php?r=05.Projects&proj=07.%20Linux%2...