Skip to content

Commit

Permalink
*: Fix compile error under macos (#9102)
Browse files Browse the repository at this point in the history
ref #8835, close #9101

Fix compile error under macos

Signed-off-by: JaySon-Huang <tshent@qq.com>
  • Loading branch information
JaySon-Huang authored May 30, 2024
1 parent 29e0ef0 commit 9e1a79f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dbms/src/Common/MemoryAllocTrace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ std::tuple<uint64_t *, uint64_t *> getAllocDeallocPtr()
{
#if USE_JEMALLOC
uint64_t * ptr1 = nullptr;
uint64_t size1 = sizeof ptr1;
size_t size1 = sizeof(ptr1);
je_mallctl("thread.allocatedp", reinterpret_cast<void *>(&ptr1), &size1, nullptr, 0);
uint64_t * ptr2 = nullptr;
uint64_t size2 = sizeof ptr2;
size_t size2 = sizeof(ptr2);
je_mallctl("thread.deallocatedp", reinterpret_cast<void *>(&ptr2), &size2, nullptr, 0);
return std::make_tuple(ptr1, ptr2);
#else
return std::make_tuple(nullptr, nullptr);
#endif
}
} // namespace DB
} // namespace DB

0 comments on commit 9e1a79f

Please sign in to comment.