use safe allocation and reallocation macros
2 files changed