forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Reclaim Support to ThreadLocalStorage
Previously, ThreadLocalStorage::StaticSlot::Free() did not actually release the corresponding ThreadLocalStorage slot. It simply cleared out the slot and did not reuse it. As a result, each process had a finite number of calls to ThreadLocalStorage::StaticSlot::Initialize() before running out of slots. This problem would manifest itself in tests where a single process runs many tests that each do their own initialization and uninitialization. Tests that involve TLS usage caused the process to run out of TLS slots because there was no free support in ThreadLocalStorage. This change adds in free support by doing what most operating systems do, lock and track metadata in an array. BUG=590907 Committed: https://crrev.com/783d1f9630c86d816669ab23981d0f3722c96808 Review-Url: https://codereview.chromium.org/2363783002 Cr-Original-Commit-Position: refs/heads/master@{#421320} Cr-Commit-Position: refs/heads/master@{#423911}
- Loading branch information
robliao
authored and
Commit bot
committed
Oct 7, 2016
1 parent
421597d
commit 45609b5
Showing
2 changed files
with
99 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters