[PATCH] D39338: [scudo] Allow to specify the maximum number of TSDs at compile time

Kostya Kortchinsky via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 27 08:31:15 PDT 2017


cryptoad added inline comments.


================
Comment at: lib/scudo/scudo_platform.h:44
+// Maximum number of caches that can be created for the Shared TSD model.
+#ifndef SCUDO_MAX_CACHES
+# define SCUDO_MAX_CACHES 32U
----------------
alekseyshl wrote:
> cryptoad wrote:
> > alekseyshl wrote:
> > > SCUDO_MAX_SHARED_THREAD_CACHES, maybe? 
> > I would vote for something shorter if possible :)
> SCUDO_MAX_CACHES is not clear at all, what kind of cache is governed by this define. Call it SCUDO_MAX_TSD_CACHES then.
> 
> 
After sleeping over this, I don't think the initial CACHE naming for that define was appropriate.
A TSD contains not only the Cache but the QuarantineCache, the Prng, and some other private members.
Something like SCUDO_MAX_SHARED_TSDS (the final S is somewhat awkward) would encompass the fact that it's a maximum value that only applies to shared TSDs.
My fear would be that to someone using this, the concept of Thread Specific Data might be foreign at best.


https://reviews.llvm.org/D39338





More information about the llvm-commits mailing list