I tested the sysinfo() call on machines with lots of RAM and lots of swap and it seems to work fine with a 2.4.16 kernel. It used mem_unit of 4096 and correctly reported 4 gig - epsilon of RAM and 6 gig - epsilon of swap.