[PATCH] D46961: [scudo] Quarantine optimization
Kostya Kortchinsky via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 16 11:16:18 PDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rCRT332502: [scudo] Quarantine optimization (authored by cryptoad, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D46961?vs=147121&id=147136#toc
Repository:
rCRT Compiler Runtime
https://reviews.llvm.org/D46961
Files:
lib/scudo/scudo_allocator.cpp
Index: lib/scudo/scudo_allocator.cpp
===================================================================
--- lib/scudo/scudo_allocator.cpp
+++ lib/scudo/scudo_allocator.cpp
@@ -197,16 +197,17 @@
// that the batches are indeed serviced by the Primary.
// TODO(kostyak): figure out the best way to protect the batches.
void *Allocate(uptr Size) {
+ const uptr BatchClassId = SizeClassMap::ClassID(sizeof(QuarantineBatch));
return getBackendAllocator().allocatePrimary(Cache_, BatchClassId);
}
void Deallocate(void *Ptr) {
+ const uptr BatchClassId = SizeClassMap::ClassID(sizeof(QuarantineBatch));
getBackendAllocator().deallocatePrimary(Cache_, Ptr, BatchClassId);
}
AllocatorCache *Cache_;
COMPILER_CHECK(sizeof(QuarantineBatch) < SizeClassMap::kMaxSize);
- const uptr BatchClassId = SizeClassMap::ClassID(sizeof(QuarantineBatch));
};
typedef Quarantine<QuarantineCallback, void> ScudoQuarantine;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D46961.147136.patch
Type: text/x-patch
Size: 946 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180516/d5aeb419/attachment.bin>
More information about the llvm-commits
mailing list