How to get SystemMemorySize?

Edward Sanford Sutton, III mirror176 at
Wed Jul 29 08:50:24 UTC 2009

Something like the following should use the power of sysctl. physmem and 
usermem in place of realmem may be of use too. Just wish I knew proper values 
nad logic to tweak kern.ipc.shmmax and similar paramaters.

int realmem;
char* realmem_mib_name = "hw.realmem";
return(sysctlbyname(usermem_mib_name, &realmem, &len, 0, 0))

More information about the freebsd-questions mailing list