I believe that the value you're retrieving is simply a SCALAR of type Integer32.
The description in the MIB is "Available Real/Physical Memory Space on the host."
It doesn't even specify the units there, so I don't think there's anywhere to retrieve the units data from. Happy to be corrected by someone if I'm wrong though!
memAvailReal OBJECT-TYPE
SYNTAX Integer32
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Available Real/Physical Memory Space on the host."
::= { memory 6 }
In other words, its a numeric value and the descriptive metadata from the MIB file doesn't even reveal the units so there's no where to get that info from in code.
Edit:
I googled around some more and found another version of the UCD-SNMP-MIB with this definition:
memAvailReal OBJECT-TYPE
SYNTAX Integer32
UNITS "kB"
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The amount of real/physical memory currently unused
or available."
::= { memory 6 }
So the info is available in this version of the MIB...
It looks like you can probably make use of this information using the SmiManager class:
http://www.snmp4j.org/smi/doc/com/snmp4j/smi/SmiManager.html
https://oosnmp.net/confluence/pages/viewpage.action?pageId=5799973
But integrating SmiManager into your application might not be trivial (and on looking into it a little bit further , it appears that there's a licence required to use SmiManager!).
For my own little project I'm pre-parsing MIBs and storing the parts of them I need in my NoSQL database rather than including full-blown MIB parsing support. That way I can have a dict of metadata associated with every OID that is easier to access/update and manipulate.
Hope that helps.