From 894c7af33d49598598ac8b82a6104ea25e18957a Mon Sep 17 00:00:00 2001
From: Phil Edwards __alloc
should not be noticably slower than
__single_client_alloc
.)
[Another threadsafe allocator where each thread keeps its own free + list, so that no locking is needed, might be described here.] +
__USE_MALLOC
If you've already read this
advice and decided to define this macro, then the situation changes
@@ -320,16 +323,30 @@
__default_alloc_template
classes take an integer parameter,
called inst here. This number is completely unused.
More soon. +
The point of the number is to allow multiple instantiations of the + classes without changing the semantics at all. All three of +
+ typedef __default_alloc_template<true,0> normal; + typedef __default_alloc_template<true,1> private; + typedef __default_alloc_template<true,42> also_private;+ behave exactly the same way. However, the memory pool for each type + (and remember that different instantiations result in different types) + remains separate. -
+
The library uses 0 in all its instantiations. If you + wish to keep separate free lists for a particular purpose, use a + different number.
I don't even remember. More soon. +
For 3.0.x, many of the names were incorrectly not prefixed + with underscores. So symbols such as "std::single_client_alloc" + are present. Be very careful to not depend on these names any more + than you would depend on implementation-only names.
-+
Certain macros like _NOTHREADS
and __STL_THREADS
+ can affect the 3.0.x allocators. Do not use them.
+
More notes as we remember them...
Return to top of page or to the FAQ. -- 2.30.2