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

Aleksey Shlyapnikov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 27 10:37:01 PDT 2017


alekseyshl accepted this revision.
alekseyshl added inline comments.
This revision is now accepted and ready to land.


================
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
----------------
cryptoad wrote:
> 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.
I agree, but why would someone not aware of what TSD is want to change this value?

Another option, SCUDO_SHARED_TSD_POOL_SIZE, to avoid that S at the end.


https://reviews.llvm.org/D39338





More information about the llvm-commits mailing list