Replace malloc() with LOG_MALLOC()