deleted the macro for memory allocation checking. Instead, used the assert function to do this checking