Fix complie issue for ALLOC_INSTRUMENTATION

This commit is contained in:
Johannes M. Scheuermann 2024-02-01 14:44:02 +01:00
parent 970175a8a2
commit b2b3a8e791
2 changed files with 2 additions and 2 deletions

View File

@ -3242,10 +3242,10 @@ void outOfMemory() {
.detail("BackTraces", traceCounts.size());
for (auto i = traceCounts.begin(); i != traceCounts.end(); ++i) {
char buf[1024];
std::vector<void*>* frames = i->second.backTrace;
std::string backTraceStr;
#if defined(_WIN32)
char buf[1024];
for (int j = 1; j < frames->size(); j++) {
_snprintf(buf, 1024, "%p ", frames->at(j));
backTraceStr += buf;

View File

@ -396,10 +396,10 @@ SystemStatistics customSystemMonitor(std::string const& eventName, StatisticsSta
uint64_t totalSize = 0;
uint64_t totalCount = 0;
for (auto i = traceCounts.begin(); i != traceCounts.end(); ++i) {
char buf[1024];
std::vector<void*>* frames = i->second.backTrace;
std::string backTraceStr;
#if defined(_WIN32)
char buf[1024];
for (int j = 1; j < frames->size(); j++) {
_snprintf(buf, 1024, "%p ", frames->at(j));
backTraceStr += buf;