introduce wrappers for malloc/realloc