Cache size per class size in SizeClassAllocatorXLocalCache.
authorAlex Shlyapnikov <alekseys@google.com>
Thu, 13 Apr 2017 16:49:16 +0000 (16:49 +0000)
committerAlex Shlyapnikov <alekseys@google.com>
Thu, 13 Apr 2017 16:49:16 +0000 (16:49 +0000)
commit8b2caae996b03b07778c90bddf53406f6e64bd27
treeb081c6a5fad3f471d9972ae85e671582ece74b4c
parent0a7894d99c0842a4cd870b40c400f31db6798eab
Cache size per class size in SizeClassAllocatorXLocalCache.

Summary:
Allocator::ClassIdToSize() is not free and calling it in every
Allocate/Deallocate has noticeable impact on perf.
Reapplying D31991 with the appropriate fixes.

Reviewers: cryptoad

Subscribers: kubamracek, llvm-commits

Differential Revision: https://reviews.llvm.org/D32024

llvm-svn: 300216
compiler-rt/lib/sanitizer_common/sanitizer_allocator_local_cache.h