You just need to make sure to synchronize access to malloc in a multi-threaded application. Otherwise it should be fine.