Improve datatype compat for mem_available()
Add malloc macros