add tmalloc.c code into file