1. thread safe malloc. 2. bug fix for thread_fork