Add malloc macros
Improve datatype compat for mem_available()