20 Mar
2019
20 Mar
'19
10:05 a.m.
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: [cid:image001.png@01D4DF46.BA4E1090] And frame allocator is taking heap: [cid:image004.png@01D4DF47.6F38C310] 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.