This is the mail archive of the
libstdc++@sourceware.cygnus.com
mailing list for the libstdc++ project.
Re: STL-String memory leak?
- To: krueger at obk dot telekom dot de
- Subject: Re: STL-String memory leak?
- From: Gabriel Dos Reis <Gabriel dot Dos-Reis at cmla dot ens-cachan dot fr>
- Date: 02 May 2000 15:53:07 +0200
- Cc: libstdc++ at sourceware dot cygnus dot com
- Organization: CMLA, ENS Cachan -- CNRS UMR 8536 (France)
- References: <20000502142023.U14359@WBS00013.obk.telekom.de>
- Reply-To: libstdc++ at sourceware dot cygnus dot com
Gero Krueger <krueger@obk.telekom.de> writes:
| Hello developers !
|
| I've got some memory-problems using stl-strings.
| I'm running RH6.1 kernel 2.2.12 with g++ 2.95.1.
|
| Please take a look at the following short piece of code:
[...]
| The programm should clear all memory allocated by
| the "new" statement.
"should clear" is strong a requirement.
| When I watch it with "ps axu" and take a look at its memory
| consumption - no memory is freed.
|
| My questions are:
|
| Can I really measure the memory consumption with ps ?
I don't think ps is accurate enough for measuring memory consumption
in a given program.
| Did I make a basic mistake ?
I think the right question would be: when does 'free()' free memory?
But I bet the answer is completely orthogonal to the issue of possible
memory leakage in v-3's implementation of std::string.
-- Gaby