Running net-snmp 5.7.1 on RedHat 6.7 (x86_64) querying oid 1.3.6.1.4.1.2021.4.5 to get memTotalReal is returning a negative value on a server with >3TB of RAM. The bug appears to be that net-snmp is printing out the value assuming a signed integer when the value is actually unsigned. If you convert the negative value from signed to unsigned, then the value is correct.
So on a Linux server where /proc/memory shows:
MemTotal: 3175832212 kB
an snmpwalk (snippet) shows:
.1.3.6.1.2.1.25.2.3.1.5.1 = INTEGER: 3175832212
.1.3.6.1.4.1.2021.4.5.0 = INTEGER: -1119135128 kB
Sorry, should have been /proc/meminfo not /proc/memory