tsan: de-hardcode MemCount const

Use MemCount instead of hard-coded value 7.

Reviewed By: melver

Differential Revision: https://reviews.llvm.org/D110532
This commit is contained in:
Dmitry Vyukov 2021-09-27 13:30:32 +02:00
parent 33031545bf
commit 1455b552b7
1 changed files with 1 additions and 1 deletions

View File

@ -122,7 +122,7 @@ void FillProfileCallback(uptr p, uptr rss, bool file,
void WriteMemoryProfile(char *buf, uptr buf_size, u64 uptime_ns) {
uptr mem[MemCount];
internal_memset(mem, 0, sizeof(mem));
GetMemoryProfile(FillProfileCallback, mem, 7);
GetMemoryProfile(FillProfileCallback, mem, MemCount);
auto meta = ctx->metamap.GetMemoryStats();
StackDepotStats *stacks = StackDepotGetStats();
uptr nthread, nlive;