public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: libstdc++/4219: stl_alloc using -D__USE_MALLOC fails
@ 2001-11-03 15:49 ljrittle
0 siblings, 0 replies; 4+ messages in thread
From: ljrittle @ 2001-11-03 15:49 UTC (permalink / raw)
To: bjornw, gcc-bugs, gcc-gnats, gcc-prs, ljrittle
Synopsis: stl_alloc using -D__USE_MALLOC fails
State-Changed-From-To: feedback->closed
State-Changed-By: ljrittle
State-Changed-When: Thu Nov 15 00:48:01 2001
State-Changed-Why:
Patch applied to mainline.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&pr=4219&database=gcc
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: libstdc++/4219: stl_alloc using -D__USE_MALLOC fails
@ 2001-11-03 18:56 ljrittle
0 siblings, 0 replies; 4+ messages in thread
From: ljrittle @ 2001-11-03 18:56 UTC (permalink / raw)
To: ljrittle; +Cc: gcc-prs
The following reply was made to PR libstdc++/4219; it has been noted by GNATS.
From: ljrittle@gcc.gnu.org
To: bjornw@planetarion.com, gcc-bugs@gcc.gnu.org, gcc-gnats@gcc.gnu.org,
gcc-prs@gcc.gnu.org, ljrittle@gcc.gnu.org
Cc:
Subject: Re: libstdc++/4219: stl_alloc using -D__USE_MALLOC fails
Date: 15 Nov 2001 08:48:02 -0000
Synopsis: stl_alloc using -D__USE_MALLOC fails
State-Changed-From-To: feedback->closed
State-Changed-By: ljrittle
State-Changed-When: Thu Nov 15 00:48:01 2001
State-Changed-Why:
Patch applied to mainline.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&pr=4219&database=gcc
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: libstdc++/4219: stl_alloc using -D__USE_MALLOC fails
@ 2001-09-04 14:02 ljrittle
0 siblings, 0 replies; 4+ messages in thread
From: ljrittle @ 2001-09-04 14:02 UTC (permalink / raw)
To: bjornw, gcc-bugs, gcc-prs, ljrittle, nobody
Synopsis: stl_alloc using -D__USE_MALLOC fails
Responsible-Changed-From-To: unassigned->ljrittle
Responsible-Changed-By: ljrittle
Responsible-Changed-When: Tue Sep 4 14:02:27 2001
Responsible-Changed-Why:
Look like mine.
State-Changed-From-To: open->feedback
State-Changed-By: ljrittle
State-Changed-When: Tue Sep 4 14:02:27 2001
State-Changed-Why:
BTW, I think it would be a good idea to make the
change you spotted.
Is there a reason why you can't follow this advice on
the new way to use the malloc interface in your application
(from ./include/bits/c++config but see the primary
documentation on the matter as well):
// Default to the typically high-speed, pool-based allocator (as
// libstdc++-v2) instead of the malloc-based allocator (libstdc++-v3
// snapshots). See libstdc++-v3/docs/html/17_intro/howto.html for
// details on why you don't want to override this setting. Ensure
// that threads are properly configured on your platform before
// assigning blame to the STL container-memory allocator. After doing
// so, please report any possible issues to libstdc++@gcc.gnu.org .
// Do not blindly #define __USE_MALLOC here or on the command line.
The problem with users defining __USE_MALLOC on the command
line is that it is a subtle ABI change that may cause you
problems...
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=4219&database=gcc
^ permalink raw reply [flat|nested] 4+ messages in thread
* libstdc++/4219: stl_alloc using -D__USE_MALLOC fails
@ 2001-09-04 1:46 bjornw
0 siblings, 0 replies; 4+ messages in thread
From: bjornw @ 2001-09-04 1:46 UTC (permalink / raw)
To: gcc-gnats
>Number: 4219
>Category: libstdc++
>Synopsis: stl_alloc using -D__USE_MALLOC fails
>Confidential: no
>Severity: critical
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Sep 04 01:46:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: bjornw@planetarion.com
>Release: gcc version 3.1 20010901 (experimental)
>Organization:
>Environment:
redhat-6.2 (all pacthed up june 2001), kernel-2.4.9
>Description:
I have a heavy multithreaded application (database server proxy with connection pooling) using stl and friends. Historically gcc-2 leaked memory while using builtin memory allocation scheme. Using -D__USE_MALLOC enforcing simple memory allocation classes was the only way to make my servers live for more than 5 minutes without eating up 500MB RAM.
g++ fails to compile anything cause a bug in stl_alloc.h
>How-To-Repeat:
Compile a program using -D__USE_MALLOC
>Fix:
stl_alloc.h: 258
Original code:
# ifdef __USE_MALLOC
typedef malloc_alloc alloc;# ifdef __USE_MALLOC
typedef malloc_alloc single_client_alloc;
#else
Change this into:
# ifdef __USE_MALLOC
typedef __mem_interface alloc;
typedef __mem_interface single_client_alloc;
# else
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2001-11-15 8:56 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-11-03 15:49 libstdc++/4219: stl_alloc using -D__USE_MALLOC fails ljrittle
-- strict thread matches above, loose matches on Subject: below --
2001-11-03 18:56 ljrittle
2001-09-04 14:02 ljrittle
2001-09-04 1:46 bjornw
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).