Replaced non-standard memory functions with standard ones.