From b7b97bb2dda71758852c3c011f8853e372baf523 Mon Sep 17 00:00:00 2001
From: pme
- Here is another attempt at explaining the dangers of using the +
Here is another attempt at explaining the dangers of using the STL with threading support without understanding some important details. The STL implementation is currently configured to use the high-speed caching memory allocator. If you absolutely @@ -82,22 +81,21 @@ libstdc++-v3 when you provide -D__USE_MALLOC on the command line or make a change to that configuration file.
-- If you don't like caches of objects being retained inside the - STL, then you might be tempted to define __USE_MALLOC either on - the command line or by rebuilding c++config.h. Please note, - once you define __USE_MALLOC, only the malloc allocator is - visible to application code (i.e. the typically higher-speed - allocator is not even available in this configuration). There - is a better way: It is possible to force the malloc-based - allocator on a per-case-basis for some application code even - when the above macro symbol is not defined. The author of this - comment believes that is a better way to tune an application for - high-speed using this implementation of the STL. Here is one - possible example displaying the forcing of the malloc-based +
If you don't like caches of objects being retained inside the STL, then
+ you might be tempted to define __USE_MALLOC either on the command
+ line or by rebuilding c++config.h. Please note, once you define
+ __USE_MALLOC, only the malloc allocator is visible to application code
+ (i.e. the typically higher-speed allocator is not even available
+ in this configuration). There is a better way: It is possible
+ to force the malloc-based allocator on a per-case-basis for some
+ application code even when the above macro symbol is not defined.
+ The library team generally believes that this is a better way to tune
+ an application for high-speed using this implementation of the STL.
+ Here is one possible example displaying the forcing of the malloc-based
allocator over the typically higher-speed default allocator:
-
- std::list
+ std::list <void*, std::malloc_alloc> my_malloc_based_list;
+
A recent journal article has described "atomic integer operations," which would allow us to, well, perform updates @@ -114,16 +112,18 @@ latest-to-oldest order.
Comments and suggestions are welcome, and may be sent to
the mailing list.
-
$Id: howto.html,v 1.5 2001/05/31 02:45:03 ljrittle Exp $
+
$Id: howto.html,v 1.6 2001/06/08 03:53:35 ljrittle Exp $
extern "C or C++" void f1 (void); extern "C or C++" void f2 (void); @@ -265,7 +265,7 @@Comments and suggestions are welcome, and may be sent to the mailing list. -
diff --git a/libstdc++-v3/docs/html/19_diagnostics/howto.html b/libstdc++-v3/docs/html/19_diagnostics/howto.html index 27e6361..f757606 100644 --- a/libstdc++-v3/docs/html/19_diagnostics/howto.html +++ b/libstdc++-v3/docs/html/19_diagnostics/howto.html @@ -8,7 +8,7 @@
$Id: howto.html,v 1.2 2001/04/03 00:26:55 pme Exp $ +
$Id: howto.html,v 1.3 2001/05/30 21:54:58 pme Exp $libstdc++-v3 HOWTO: Chapter 19 - + @@ -59,8 +59,15 @@
Exception class hierarchy diagram
-The diagram is in PDF, or - at least it will be once it gets finished. +
At one point we were going to make up a PDF of the exceptions + hierarchy, akin to the one done for the I/O class hierarchy. + Time was our enemy. Since then we've moved to Doxygen, which has + the useful property of not sucking. Specifically, when the source + code is changed, the diagrams are automatically brought up to date. + For the old way, we had to update the diagrams separately. +
+There are several links to the Doxygen-generated pages from + here.
Return to top of page or to the FAQ. @@ -108,7 +115,7 @@
Comments and suggestions are welcome, and may be sent to the mailing list. -
diff --git a/libstdc++-v3/docs/html/22_locale/howto.html b/libstdc++-v3/docs/html/22_locale/howto.html index 55d2842..2edcad9 100644 --- a/libstdc++-v3/docs/html/22_locale/howto.html +++ b/libstdc++-v3/docs/html/22_locale/howto.html @@ -8,7 +8,7 @@
$Id: howto.html,v 1.3 2001/04/03 00:26:55 pme Exp $ +
$Id: howto.html,v 1.4 2001/05/30 21:54:59 pme Exp $libstdc++-v3 HOWTO: Chapter 22 - + @@ -16,6 +16,10 @@Chapter 22 deals with the C++ localization facilities.
+ @@ -176,7 +180,7 @@ int main () { std::string s ("Some Kind Of Initial Input Goes Here"); - Toupper up ( std::locale("C") ); + Toupper up ( std::locale("C") ); Tolower down ( std::locale("C") ); // Change everything into upper case @@ -210,7 +214,7 @@Comments and suggestions are welcome, and may be sent to the mailing list. -
diff --git a/libstdc++-v3/docs/html/23_containers/howto.html b/libstdc++-v3/docs/html/23_containers/howto.html index 03ba35d..7ae920b 100644 --- a/libstdc++-v3/docs/html/23_containers/howto.html +++ b/libstdc++-v3/docs/html/23_containers/howto.html @@ -8,7 +8,7 @@
$Id: howto.html,v 1.3 2001/04/03 00:26:55 pme Exp $ +
$Id: howto.html,v 1.4 2001/08/08 02:48:58 bkoz Exp $libstdc++-v3 HOWTO: Chapter 23 - + @@ -26,6 +26,7 @@
For multimap and multiset, the restrictions are + slightly looser: "greater than" should be replaced by + "not less than" and "less than" should be replaced + by "not greater than." (Why not replace greater with + greater-than-or-equal-to? You probably could in your head, but the + mathematicians will tell you that it isn't the same thing.) +
If the conditions are not met, then the hint is not used, and the insertion proceeds as if you had called a.insert(t) instead. (Note that GCC releases prior to 3.0.2 - had a bug in the case with hint == begin(). You should not - use a hint argument in those releases.) -(Was it just with map or with all the rbtree-using containers? Still need -to check that.) + had a bug in the case with hint == begin() for the + map and set classes. You should not use a hint + argument in those releases.)
This behavior goes well with other container's insert() functions which take an iterator: if used, the new item will be @@ -326,6 +333,29 @@ to check that.) to the FAQ.
+Bitmasks do not take char* nor const char* arguments in their + constructors. This is something of an accident, but you can read + about the problem: follow the library's "Links" from the + homepage, and from the C++ information "defect reflector" + link, select the library issues list. Issue number 116 describes the + problem. +
+For now you can simply make a temporary string object using the + constructor expression: +
+ std::bitset<5> b ( std::string("10110") ); ++ instead of +
+ std::bitset<5> b ( "10110" ); // invalid ++ +
Return to top of page or + to the FAQ. +
+ @@ -333,7 +363,7 @@ to check that.)
Comments and suggestions are welcome, and may be sent to
the mailing list.
-
$Id: howto.html,v 1.6 2001/06/08 03:53:35 ljrittle Exp $
+
$Id: howto.html,v 1.7 2001/08/24 20:34:34 pme Exp $
Comments and suggestions are welcome, and may be sent to
the mailing list.
-
$Id: howto.html,v 1.2 2001/04/03 00:26:56 pme Exp $
+
$Id: howto.html,v 1.3 2001/05/30 21:55:02 pme Exp $