[Memory management] malloc.c functions and tests