New checking free memory functionality