Bug?: g++, memusage reports memory leak with an empty programm

Christoph Rabel odie@hal9000.vc-graz.ac.at
Thu Mar 20 20:26:00 GMT 2003


Hi!

I compiled the following programm and started it using memusage. The 
result were 116 bytes allocated and not freed.

memtest.cpp
  int main() {}  // Empty program, does nothing

Compiled with
g++ memtest.cpp -o memtest

memusage ./memtest

Here memusage reports 116 bytes that were allocated but not freed. On 
another machine the value was not 116 but 64. So this doesnt seem to be 
a constant.

I tested with gcc 3.1 and gcc 3.2  20020903, on Debian and Suse, with 
memusage and valgrind, always some bytes lost.

Is this a bug or can this "leak" be ignored?

thx,

Christoph



More information about the Gcc-bugs mailing list