Add a test to repeatedly malloc and free from different threads to test if these functions are thread safe.