Skip to content

Commit 445f4fd

Browse files
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 #460
1 parent 0c93178 commit 445f4fd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

runtime/flangrti/mpmalloc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.
2+
* Copyright (c) 1998-2018, NVIDIA CORPORATION. All rights reserved.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

0 commit comments

Comments
 (0)