[PATCH] D48148: [scudo] Make Secondary linker-initialized compliant
Kostya Kortchinsky via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 14 07:37:57 PDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rCRT334716: [scudo] Make Secondary linker-initialized compliant (authored by cryptoad, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D48148?vs=151235&id=151349#toc
Repository:
rCRT Compiler Runtime
https://reviews.llvm.org/D48148
Files:
lib/scudo/scudo_allocator_secondary.h
Index: lib/scudo/scudo_allocator_secondary.h
===================================================================
--- lib/scudo/scudo_allocator_secondary.h
+++ lib/scudo/scudo_allocator_secondary.h
@@ -69,11 +69,7 @@
class ScudoLargeMmapAllocator {
public:
void Init() {
- NumberOfAllocs = 0;
- NumberOfFrees = 0;
- AllocatedBytes = 0;
- FreedBytes = 0;
- LargestSize = 0;
+ internal_memset(this, 0, sizeof(*this));
}
void *Allocate(AllocatorStats *Stats, uptr Size, uptr Alignment) {
@@ -186,7 +182,7 @@
static constexpr uptr HeadersSize =
LargeChunk::getHeaderSize() + Chunk::getHeaderSize();
- SpinMutex StatsMutex;
+ StaticSpinMutex StatsMutex;
u32 NumberOfAllocs;
u32 NumberOfFrees;
uptr AllocatedBytes;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D48148.151349.patch
Type: text/x-patch
Size: 763 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180614/3ad5ab6b/attachment.bin>
More information about the llvm-commits
mailing list