title: How to get Data Segment Size in C++
body: <p>I need to do analysis of memory requirements of one library written in C++, because HW engineers need get some idea about memory requirements of our hardware, there are working on. I can measure heapsize peak, I can <a href="https://stackoverflow.com/questions/1756285/stack-size-estimation">measure stack size</a>, but I don't know how to estimate/measure <a href="http://www.inf.udec.cl/~leo/teoX.pdf" rel="nofollow noreferrer">data segment size</a> and Bss size. Is there any method in Visual Studio or GCC? I assume it will differs from compiler to compiler and from platform to platform, but an estimation is fine for me.</p>