Adding some memory wrappers (not yet tested)