Commit 445f4fd
committed
Update copyright notice
Remove runtime locks around malloc()/free() in mpmalloc.c for
glibc-based systems.
This is due to following statement in the glibc manual:
To avoid corruption in multithreaded applications,
mutexes are used internally to protect the memory-management
data structures employed by these functions. In a multithreaded
application in which threads simultaneously allocate and free
memory, there could be contention for these mutexes. To scalably
handle memory allocation in multithreaded applications,
glibc creates additional memory allocation arenas if mutex
contention is detected. Each arena is a large region of memory
that is internally allocated by the system (using brk(2)
or mmap(2)), and managed with its own mutexes.
Having locks around them in the flang runtime library
can ruin optimization effort when tcmalloc is preloaded
to replace standard malloc()/free() implementation with
the one optimized for reducing lock contention.
Implements pull request #4601 parent 0c93178 commit 445f4fd
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
0 commit comments