This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Counting amount of memory allocated?


>Is there a 3.2 compatible solution to this problem?  Is __USE_MALLOC still
>available?  I am running in a single threaded context, so at least those
>headaches shouldn't be a problem.

No to the first two.

I'm hoping this work gets moved over though. I just did the symbol
versioning support for it, so I think it could get moved without
breaking the ABI.

Loren? Thoughts? This isn't really a regression, etc. etc. so it will
have to wait for 3.2.2. Hopefully by then the --enable-debug bits will
be in too.

Till then, try with mainline.

>$ ./a.out
>Start: 36
>One map: 320068
>empty map: 68
>second map: 320068
>map destroyed: 36

with mainline:

%a.out
Start: 976
One map: 252048
empty map: 252048
second map: 252048
map destroyed: 252048

%setenv GLIBCPP_FORCE_NEW

%a.out
Start: 976
One map: 321008
empty map: 1008
second map: 321008
map destroyed: 976


>You should, it is currently a bit of a black art.  :)

You seem to be in good company with that assessment. I'll work on it
after I finish the pending IO bugs.

-benjamin


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]