I am using stacktrace on Windows. I found stacktrace keep eating my memory. A simple test program:

 

void foo() {

  auto st = boost::stacktrace::stacktrace{};

  auto line = st.begin()->source_line();

  std::cout << line << std::endl;

}

void main() {

  for (int i = 0; i < 0xFFFF; i++) {

    foo();

  }

}

 

Based on MSVC memory profiling tool, memory usage keep growth:

 

And frame allocator is taking heap:

 

 

Anyone knows why it happens?

 

Br,

Hao.

 

 

Platform: Windows 7.

Compiler: MSVC 2017

Boost version: 1.67

Compile and link: release, static-link, static runtime.