mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-07-07 03:48:42 +03:00
Introduction of mi_mem_clear
This commit is contained in:
parent
fd3ce5dc7d
commit
e398a3d52c
3 changed files with 13 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue