[PATCH] D62258: [scudo][standalone] Introduce the thread specific data structures

Kostya Kortchinsky via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 22 08:19:11 PDT 2019


cryptoad created this revision.
cryptoad added reviewers: eugenis, vitalybuka, morehouse, hctim.
Herald added subscribers: Sanitizers, jfb, delcypher, mgorny, srhines.
Herald added projects: LLVM, Sanitizers.

This CL adds the structures dealing with thread specific data for the
allocator. This includes the thread specific data structure itself and
two registries for said structures: an exclusive one, where each thread
will have its own TSD struct, and a shared one, where a pool of TSD
structs will be shared by all threads, with dynamic reassignment at
runtime based on contention.

This departs from the current Scudo implementation: we intend to make
the Registry a template parameter of the allocator (as opposed to a
single global entity), allowing various allocators to coexist with
different TSD registry models. As a result, TSD registry and Allocator
are tightly coupled.

This also corrects a couple of things in other files that I noticed
while adding this.


Repository:
  rCRT Compiler Runtime

https://reviews.llvm.org/D62258

Files:
  lib/scudo/standalone/CMakeLists.txt
  lib/scudo/standalone/internal_defs.h
  lib/scudo/standalone/tests/CMakeLists.txt
  lib/scudo/standalone/tests/primary_test.cc
  lib/scudo/standalone/tests/tsd_test.cc
  lib/scudo/standalone/tsd.h
  lib/scudo/standalone/tsd_exclusive.h
  lib/scudo/standalone/tsd_shared.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D62258.200755.patch
Type: text/x-patch
Size: 17625 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190522/5d6e0138/attachment-0001.bin>


More information about the llvm-commits mailing list