Hello,
I was wondering how to make malloc() thread safe. Could I just use a mutex everytime I use malloc() in my code example
And if that's the case could I make any function thread safe that way?Code:pthread_mutex_lock(&malloc_mutex); // Malloc Code here pthread_mutex_unlock(&malloc_mutex);
Thanks,
scioner