Introduction of mi_mem_clear

This commit is contained in:
David Carlier 2019-11-18 09:49:29 +00:00
parent fd3ce5dc7d
commit e398a3d52c
3 changed files with 13 additions and 1 deletions

View file

@ -248,7 +248,7 @@ static void* thread_entry(void* param) {
static void run_os_threads(size_t nthreads) {
pthread_t* threads = (pthread_t*)custom_malloc(nthreads*sizeof(pthread_t));
memset(threads, 0, sizeof(pthread_t)*nthreads);
mi_mem_clear(threads, sizeof(pthread_t)*nthreads);
//pthread_setconcurrency(nthreads);
for (uintptr_t i = 0; i < nthreads; i++) {
pthread_create(&threads[i], NULL, &thread_entry, (void*)i);