[boost-doc-zh commit] r246 - 完成 pool 库的文档翻译

  • From: codesite-noreply@xxxxxxxxxx
  • To: boost-doc-zh-notify@xxxxxxxxxxxxx
  • Date: Wed, 27 May 2009 08:52:05 +0000

Author: alai04
Date: Wed May 27 01:51:16 2009
New Revision: 246

Modified:
   trunk/glossary/glossary.txt
   trunk/libs/libraries.htm
   trunk/libs/pool/doc/concepts.html
   trunk/libs/pool/doc/implementation/alignment.html
   trunk/libs/pool/doc/implementation/ct_gcd_lcm.html
   trunk/libs/pool/doc/implementation/for.html
   trunk/libs/pool/doc/implementation/gcd_lcm.html
   trunk/libs/pool/doc/implementation/guard.html
   trunk/libs/pool/doc/implementation/mutex.html
   trunk/libs/pool/doc/implementation/object_pool.html
   trunk/libs/pool/doc/implementation/pool.html
   trunk/libs/pool/doc/implementation/pool_alloc.html
   trunk/libs/pool/doc/implementation/pool_construct.html
   trunk/libs/pool/doc/implementation/simple_segregated_storage.html
   trunk/libs/pool/doc/implementation/singleton.html
   trunk/libs/pool/doc/implementation/singleton_pool.html
   trunk/libs/pool/doc/index.html
   trunk/libs/pool/doc/interfaces.html
   trunk/libs/pool/doc/interfaces/object_pool.html
   trunk/libs/pool/doc/interfaces/pool.html
   trunk/libs/pool/doc/interfaces/pool_alloc.html
   trunk/libs/pool/doc/interfaces/simple_segregated_storage.html
   trunk/libs/pool/doc/interfaces/singleton_pool.html
   trunk/libs/pool/doc/interfaces/user_allocator.html

Log:
完成 pool 库的文档翻译

Modified: trunk/glossary/glossary.txt
==============================================================================
--- trunk/glossary/glossary.txt (original)
+++ trunk/glossary/glossary.txt Wed May 27 01:51:16 2009
@@ -130,6 +130,10 @@

  5) flyweight                  //alai04
  memoization                   暗记法
+
+ 6) pool                       //alai04
+ block                         内存块
+ chunk                         内存区块 或 区块

 f) misc 其它
 rationale              理论注记

Modified: trunk/libs/libraries.htm
==============================================================================
--- trunk/libs/libraries.htm    (original)
+++ trunk/libs/libraries.htm    Wed May 27 01:51:16 2009
@@ -638,7 +638,7 @@
 <a href="compatibility/index.html">compatibility</a>,
 <a href="concept_check/concept_check.htm">concept check</a>,
<a href="config/config.htm">config</a>, <a href="conversion/index.html">conversion</a>, <a href="date_time/doc/index.html">date_time</a>, <a href="filesystem/doc/index.htm">filesystem</a>, <a href="foreach/index.html">foreach</a>,&nbsp;<a href="function_types/index.html">function_types</a>, <a href="functional/index.html">functional</a>, <a href="integer/index.html">integer</a>, <a href="intrusive/index.html">intrusive</a>, <a href="io/doc/ios_state.html">io state savers</a>, <a href="iostreams/doc/index.html">iostreams</a>, <a href="iterator/doc/index.html">iterators</a>, <a href="algorithm/minmax/index.html">minmax</a>, <a href="mpl/doc/index.html">mpl</a>, <a href="multi_array/doc/index.html">multi_array</a>, <a href="multi_index/doc/index.html">multi_index</a>, <a href="numeric/conversion/doc/html/index.html">numeric/conversion</a>, <a href="utility/operators.htm">operators</a>, <a href="optional/doc/html/index.html">optional</a>, <a href="ptr_container/index.html">pointer -container</a>, <a href="preprocessor/doc/index.html">preprocessor</a>, <a href="../doc/html/program_options.html">program_options</a>, +container</a>, <a href="pool/doc/index.html">pool</a>, <a href="preprocessor/doc/index.html">preprocessor</a>, <a href="../doc/html/program_options.html">program_options</a>, <a href="property_map/property_map.html">property map</a>, <a href="proto/index.html">proto</a>, <a href="range/index.html">range</a>, <a href="rational/index.html">rational</a>, <a href="scope_exit/doc/html/index.html">scope_exit</a>, <a href="serialization/doc/index.html">serialization</a>, <a href="statechart/doc/index.html">statechart</a>, <a href="utility/swap.html">swap</a>, <a href="system/doc/index.html">system</a>, <a href="tokenizer/index.html">tokenizer</a>, <a href="tr1/index.html">TR1</a>, <a href="../doc/html/tribool.html">tribool</a>, <a href="../doc/html/unordered.html">unordered</a>, <a href="utility/utility.htm">utility</a>, <a href="utility/value_init.htm">value_initialized</a>, <a href="variant/index.html">variant</a>,&nbsp;<a href="wave/index.html">wave</a> 以及 <a href="../doc/html/tools.html">Boost Tools</a>&nbsp; </p>

Modified: trunk/libs/pool/doc/concepts.html
==============================================================================
--- trunk/libs/pool/doc/concepts.html   (original)
+++ trunk/libs/pool/doc/concepts.html   Wed May 27 01:51:16 2009
@@ -1,23 +1,19 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
-"http://www.w3.org/TR/html4/loose.dtd";>
-
-<html>
-<head>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd";>
+<html><head>
   <meta http-equiv="Content-Language" content="en-us">
-  <meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
+  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
   <link href="pool.css" rel="stylesheet" type="text/css">

-  <title>Pool Concepts</title>
-</head>
-
+  <title>Pool Concepts</title></head>
 <body>
-  <img src="../../../boost.png" width="276" height="86" alt="C++ Boost">
+  <img src="../../../boost.png" alt="C++ Boost" height="86" width="276">

-  <h1 align="center">Pool Concepts</h1>
+  <h1 align="center">Pool Concepts 内存池概念</h1>

   <blockquote>
     "Dynamic memory allocation has been a fundamental part of most computer
-    systems since roughly 1960..."<sup><a href="#ref1">1</a></sup>
+ systems since roughly 1960..."<sup><a href="concepts.html#ref1">1</a></sup> + <br>"从大约1960年以来,动态内存分配已经成为绝大多数计算机系统的基础部 分..."<sup><a href="#ref1">1</a></sup>
   </blockquote>

   <p>Everyone uses dynamic memory allocation. If you have ever called
@@ -25,7 +21,8 @@
   have used dynamic memory allocation. Most programmers have a tendency to
   treat the heap as a "magic bag": we ask it for memory, and it magically
   creates some for us. Sometimes we run into problems because the heap is
-  <em>not</em> magic.</p>
+  <em>not</em> magic.<br>每个人都要使用动态内存分配。如果你曾经调用过
+ <span class="code">malloc</span> 或 <span class="code">new</span>,那么你 就已经使用过动态内存分配。许多程序员倾向于将堆看成一个"魔术包":我们向它请求 内存,它就会象有魔法一样为我们创建一些内存。不过,有些时候我们会陷入麻烦,因 为堆并不具有魔法。</p>

   <p>The heap is limited. Even on large systems (i.e., not embedded) with
   huge amounts of virtual memory available, there is a limit. Everyone is
@@ -36,7 +33,10 @@
   multitasking system. Therefore, when running on a large system, it is
   considered "nice" to make your program use as few resources as necessary,
   and release them as soon as possible. When using an embedded system,
-  programmers usually have no memory to waste.</p>
+  programmers usually have no memory to waste.<br>堆
+是有限的。即使是在那些有大量虚拟内存可用的大型系统(即非嵌入式系统)中,也是 有限的。任何人都知道物理限制,但是"虚拟"限制更为微妙,使用虚拟内存 +时将会限制你的程序(或整个系统)慢下来。这个虚拟限制比物理限制更靠近你的程 序,尤其是当你运行在一个多任务系统中的时候。因此,在一个大型系统中运行 +时,让你的程序只按需使用尽量少的资源,并尽快释放,这种习惯被认为是"好的"习 惯。当使用嵌入式系统时,程序员通常没有内存可以浪费。</p>

   <p>The heap is complicated. It has to satisfy any type of memory request,
   for any size, and do it <em>fast</em>. The common approaches to memory
@@ -47,69 +47,67 @@
   known "perfect" answer to the problem of how to do dynamic memory
   allocation. The diagrams below illustrate how most common memory managers
work: for each chunk of memory, it uses part of that memory to maintain its
-  internal tree or list structure. Even when a chunk is <span class=
-  "code">malloc</span>'ed out to a program, the memory manager must "save"
- some information in it &mdash; usually just its size. Then, when the block + internal tree or list structure. Even when a chunk is <span class="code">malloc</span>'ed out to a program, the memory manager must "save"
+  some information in it -- usually just its size. Then, when the block
is <span class="code">free</span>'d, the memory manager can easily tell how
-  large it is.</p>
+  large it is.<br>堆
+也是复杂的。它必须满足任意类型、任意大小的内存请求,而且还要快速。内存管理 的常用方法必定会把内存分隔为一块块,并且按大小顺序排列成某种树或链表的 +结构。再加其它因素,如局部化和生命周期预估等,堆很快就会变得非常复杂。实际 上,由于其复杂性,迄今为止都没有一个"完美"的答案来解决动态内存分配的 +问题。以下图表说明了最常见的内存管理是如何工作的:对于每一大块内存,使用其 中一部分内存来管理其内部的树或链表结构。即使这一大块内存已经分配给了某 +个程序,内存管理器也必须在它里面"保存"一些信息 -- 通常只是它的大小。然后,当 该区块被释放时,内存管理器可以很容易地得知它有多大。</p>

-  <table cellspacing="0" border="3" rules="none" style=
-  "float: left; clear: both;" summary="">
+ <table style="float: left; clear: both;" summary="" border="3" cellspacing="0" rules="none">
     <caption>
-      <em>Memory block, not allocated</em>
+      <em>Memory block, not allocated 未分配的内存块</em>
     </caption>

-    <tr>
+    <tbody><tr>
       <td style="background-color: red; text-align: center;">Memory not
-      belonging to process</td>
+      belonging to process 不属于进程的内存</td>
     </tr>

     <tr>
-      <td style=
-      "padding: 1em 0em; background-color: silver; text-align: center;">
+ <td style="padding: 1em 0em; background-color: silver; text-align: center;">
       Memory used internally by memory allocator algorithm (usually 8-12
-      bytes)</td>
+      bytes)<br>内存分配器算法内部使用的内存(通常为8-12字节)</td>
     </tr>

     <tr>
-      <td style=
-      "padding: 2em 0em; background-color: gray; text-align: center">Unused
-      memory</td>
+ <td style="padding: 2em 0em; background-color: gray; text-align: center;">Unused
+      memory 未用内存</td>
     </tr>

     <tr>
       <td style="background-color: red; text-align: center;">Memory not
-      belonging to process</td>
+      belonging to process 不属于进程的内存</td>
     </tr>
-  </table>
+  </tbody></table>

-  <table cellspacing="0" border="3" rules="none" style=
-  "float: right; clear: both;" summary="">
+ <table style="float: right; clear: both;" summary="" border="3" cellspacing="0" rules="none">
     <caption>
-      <em>Memory block, allocated (used by program)</em>
+ <em>Memory block, allocated (used by program) 已分配的内存块(被程序使 用)</em>
     </caption>

-    <tr>
+    <tbody><tr>
       <td style="background-color: red; text-align: center;">Memory not
-      belonging to process</td>
+      belonging to process 不属于进程的内存</td>
     </tr>

     <tr>
       <td style="background-color: silver; text-align: center;">Memory used
-      internally by memory allocator algorithm (usually 4 bytes)</td>
+ internally by memory allocator algorithm (usually 4 bytes)<br>内存分 配器算法内部使用的内存(通常为4字节)</td>
     </tr>

     <tr>
-      <td style=
- "padding: 3em 0em; background-color: yellow; text-align: center">Memory
-      usable by program</td>
+ <td style="padding: 3em 0em; background-color: yellow; text-align: center;">Memory
+      usable by program 程序使用的内存</td>
     </tr>

     <tr>
       <td style="background-color: red; text-align: center;">Memory not
-      belonging to process</td>
+      belonging to process 不属于进程的内存</td>
     </tr>
-  </table>
+  </tbody></table>

   <p>Because of the complication of dynamic memory allocation, it is often
   inefficient in terms of time and/or space. Most memory allocation
@@ -127,23 +125,28 @@
   overhead is about ten to twenty percent<sup><a href="#ref2">2</a></sup>.
   This memory overhead will grow higher as more programs use more smaller
   objects. It is this memory overhead that brings programs closer to the
-  virtual limit.</p>
+  virtual limit.<br>因
+为动态内存分配的复杂性,它在时间和空间方面通常都是很低效的。多数内存分配算 法在每个内存块中保存某种形式的信息,块大小或其它相关信息,如它在内部树 +或链表结构中的位置。通常,这类"标题域"会占用分配给程序使用的内存块中的一个 机器字。这样,最明显的问题就是动态分配小型对象的时候。例如,如果动态 +分配一些int,且由算法自动保留用于标题域的空间,那么我们最终将浪费50%的内 存。当然,这是最坏的情况。但是,多数现代的程序都会使用堆上的小型对 +象;这使得该问题越来越明显。Wilson等人表明,平均情况下的内存开销约为 10-20%<sup><a href="concepts.html#ref2">2</a></sup>。如果更多的程序使用更多 的小型对象,这个开销将会更高。正是这种内存开销,使得程序更接近于虚拟限制。
+  </p>

   <p>In larger systems, the memory overhead is not as big of a problem
(compared to the amount of time it would take to work around it), and thus
   is often ignored. However, there are situations where many allocations
   and/or deallocations of smaller objects are taking place as part of a
   time-critical algorithm, and in these situations, the system-supplied
-  memory allocator is often too slow.</p>
+ memory allocator is often too slow.<br>在大型系统中,内存开销不是一个大问 题(与它的运行时间以及它的工作环境相对比而言),所以常常被忽略。但是,有些情形 是,在一个时间关键的算法中要大量分配和/或释放小型的对象,这时,系统所提供的 内存分配器通常都会太慢了。</p>

   <p>Simple segregated storage addresses both of these issues. Almost all
memory overhead is done away with, and all allocations can take place in a
   small amount of (amortized) constant time. However, this is done at the
   loss of generality; simple segregated storage only can allocate memory
-  chunks of a single size.</p>
+ chunks of a single size.<br>简单的分隔存储可以解决以上两个问题。几乎所有 的内存开销都没有了,且所有分配都可以在一个很小的(分摊)常量时间内完成。不 过,其代价是损失了通用性;简单的分隔存储只能分配单一大小的内存块。</p>
   <hr>

-  <h1 align="center">Simple Segregated Storage</h1>
+  <h1 align="center">Simple Segregated Storage 简单分隔存储</h1>

   <p>Simple Segregated Storage is the basic idea behind the Boost Pool
   library. Simple Segregated Storage is the simplest, and probably the
@@ -151,40 +154,35 @@
   <em>partitioning</em> a memory <em>block</em> into fixed-size
   <em>chunks</em>. Where the block comes from is not important until
   implementation time. A <em>Pool</em> is some object that uses Simple
-  Segregated Storage in this fashion. To illustrate:</p>
+ Segregated Storage in this fashion. To illustrate:<br>简单分隔存储是 Boost Pool 库背后的基本思想。简单分隔存储是最简单的,可能也是最快的内存分配 /释放算法。它先将一个内存块<em>(block)</em>分为固定大小的区块 <em>(chunks)</em>。至于内存块来自何处,在到实现之前是不重要的。内存池 <em>(Pool)</em>是以这种方式使用简单分隔存储的一些对象。举例如下:</p>

-  <table cellspacing="0" border="3" rules="none" align="center" style=
-  "clear: both;" summary="">
+ <table style="clear: both;" summary="" align="center" border="3" cellspacing="0" rules="none">
     <caption>
-      <em>Memory block, split into chunks</em>
+      <em>Memory block, split into chunks 分隔为区块的内存块</em>
     </caption>

-    <tr>
+    <tbody><tr>
       <td style="background-color: red; text-align: center;">Memory not
       belonging to process</td>
     </tr>

     <tr>
-      <td style=
-      "padding: 1em 0em; background-color: gray; text-align: center;">Chunk
+ <td style="padding: 1em 0em; background-color: gray; text-align: center;">Chunk
       0</td>
     </tr>

     <tr>
-      <td style=
-      "padding: 1em 0em; background-color: gray; text-align: center;">Chunk
+ <td style="padding: 1em 0em; background-color: gray; text-align: center;">Chunk
       1</td>
     </tr>

     <tr>
-      <td style=
-      "padding: 1em 0em; background-color: gray; text-align: center;">Chunk
+ <td style="padding: 1em 0em; background-color: gray; text-align: center;">Chunk
       2</td>
     </tr>

     <tr>
-      <td style=
-      "padding: 1em 0em; background-color: gray; text-align: center;">Chunk
+ <td style="padding: 1em 0em; background-color: gray; text-align: center;">Chunk
       3</td>
     </tr>

@@ -192,49 +190,44 @@
       <td style="background-color: red; text-align: center;">Memory not
       belonging to process</td>
     </tr>
-  </table>
+  </tbody></table>

   <p>Each of the chunks in any given block are <strong>always</strong> the
   same size. This is the fundamental restriction of Simple Segregated
   Storage: you cannot ask for chunks of different sizes. For example, you
cannot ask a Pool of integers for a character, or a Pool of characters for - an integer (assuming that characters and integers are different sizes).</p> + an integer (assuming that characters and integers are different sizes).<br>任一给定内存块中的各个区块<span style="font-weight: bold;">总是 </span>相同大小的。这是简单分隔存储的基本限制:你不能请求不同大小的区块。例 如,你不能向一个整数内存池请求一个字符,或者向一个字符内存池请求一个整数(假 定字符和整数的大小不同)。</p>

   <p>Simple Segregated Storage works by interleaving a <em>free list</em>
-  within the unused chunks. For example:</p>
+ within the unused chunks. For example:<br>简单分隔存储通过维护未用区块内 的一个<span style="font-style: italic;">可用链表</span>来工作。例如:</p>

-  <table cellspacing="0" border="3" rules="none" style=
-  "float: left; clear: both;" summary="">
+ <table style="float: left; clear: both;" summary="" border="3" cellspacing="0" rules="none">
     <caption>
-      <em>Memory block, with no chunks allocated</em>
+ <em>Memory block, with no chunks allocated 未有区块被分配的内存块 </em>
     </caption>

-    <tr>
+    <tbody><tr>
       <td style="background-color: red; text-align: center;">Memory not
       belonging to process</td>
     </tr>

     <tr>
-      <td style=
-      "padding: 1em 0em; background-color: gray; text-align: center;">Chunk
+ <td style="padding: 1em 0em; background-color: gray; text-align: center;">Chunk
       0; points to Chunk 1</td>
     </tr>

     <tr>
-      <td style=
-      "padding: 1em 0em; background-color: gray; text-align: center;">Chunk
+ <td style="padding: 1em 0em; background-color: gray; text-align: center;">Chunk
       1; points to Chunk 2</td>
     </tr>

     <tr>
-      <td style=
-      "padding: 1em 0em; background-color: gray; text-align: center;">Chunk
+ <td style="padding: 1em 0em; background-color: gray; text-align: center;">Chunk
       2; points to Chunk 3</td>
     </tr>

     <tr>
-      <td style=
-      "padding: 1em 0em; background-color: gray; text-align: center;">Chunk
+ <td style="padding: 1em 0em; background-color: gray; text-align: center;">Chunk
       3; end-of-list</td>
     </tr>

@@ -242,40 +235,35 @@
       <td style="background-color: red; text-align: center;">Memory not
       belonging to process</td>
     </tr>
-  </table>
+  </tbody></table>

-  <table cellspacing="0" border="3" rules="none" style=
-  "float: right; clear: both;" summary="">
+ <table style="float: right; clear: both;" summary="" border="3" cellspacing="0" rules="none">
     <caption>
-      <em>Memory block, with two chunks allocated</em>
+ <em>Memory block, with two chunks allocated 有两个区块被分配的内存块 </em>
     </caption>

-    <tr>
+    <tbody><tr>
       <td style="background-color: red; text-align: center;">Memory not
       belonging to process</td>
     </tr>

     <tr>
-      <td style=
-      "padding: 1em 0em; background-color: gray; text-align: center;">Chunk
+ <td style="padding: 1em 0em; background-color: gray; text-align: center;">Chunk
       0; points to Chunk 2</td>
     </tr>

     <tr>
-      <td style=
- "padding: 1em 0em; background-color: silver; text-align: center;">Chunk + <td style="padding: 1em 0em; background-color: silver; text-align: center;">Chunk
       1 (in use by process)</td>
     </tr>

     <tr>
-      <td style=
-      "padding: 1em 0em; background-color: gray; text-align: center;">Chunk
+ <td style="padding: 1em 0em; background-color: gray; text-align: center;">Chunk
       2; end-of-list</td>
     </tr>

     <tr>
-      <td style=
- "padding: 1em 0em; background-color: silver; text-align: center;">Chunk + <td style="padding: 1em 0em; background-color: silver; text-align: center;">Chunk
       3 (in use by process)</td>
     </tr>

@@ -283,12 +271,12 @@
       <td style="background-color: red; text-align: center;">Memory not
       belonging to process</td>
     </tr>
-  </table>
+  </tbody></table>

<p>By interleaving the free list inside the chunks, each Simple Segregated Storage only has the overhead of a single pointer (the pointer to the first
   element in the list). It has <em>no</em> memory overhead for chunks that
-  are in use by the process.</p>
+ are in use by the process.通过维持区块内的一个可用链表,每个简单分隔存储 只有单个指针的开销(该指针指向链表中的第一个元素)。对于被进程使用的区块则没有 内存开销。</p>

<p>Simple Segregated Storage is also extremely fast. In the simplest case, memory allocation is merely removing the first chunk from the free list, a
@@ -297,30 +285,31 @@
O(1) time. Memory deallocation may be as simple as adding that chunk to the front of the free list, a O(1) operation. However, more complicated uses of
   Simple Segregated Storage may require a sorted free list, which makes
-  deallocation O(N).</p>
+  deallocation O(N).<br>简
+单分隔存储也非常快。在最简单的情况下,内存分配只不过是将第一个区块移离可用 链表,这是一个O(1)操作。如果可用链表为空,则需要申请另一个内存块并 +进行分隔,这是一个分摊的O(1)时间复杂度的操作。内存的释放也很简单,只是将区 块重新加到可用链表的开始,这是一个O(1)操作。但是,对简单分隔存 +储的更为复杂的使用可能需要一个已排序的可用链表,这将使得释放操作变为O(N)复 杂度。</p>

   <p>Simple Segregated Storage gives faster execution and less memory
overhead than a system-supplied allocator, but at the loss of generality. A good place to use a Pool is in situations where many (noncontiguous) small objects may be allocated on the heap, or if allocation and deallocation of
-  the same-sized objects happens repeatedly.<br clear="all"></p>
+ the same-sized objects happens repeatedly.<br>简单分隔存储比系统提供的分 配器执行得更快,内存开销也更少,但是损失了通用性。使用内存池的一个好地方 是,要在堆上分配多个(非连续的)小型对象的情形,或者是对相同大小的对象的分配和 释放反复发生的情形。<br clear="all"></p>
   <hr>

-  <h2>References</h2>
+  <h2>References 参考资料</h2>

   <ol>
     <li><a name="ref1" id="ref1">Doug Lea, <em>A Memory Allocator</em>.</a>
-    Available on the web at <a href=
-    
"http://gee.cs.oswego.edu/dl/html/malloc.html";>http://gee.cs.oswego.edu/dl/html/malloc.html</a></li>
+ Available on the web at <a href="http://gee.cs.oswego.edu/dl/html/malloc.html";>http://gee.cs.oswego.edu/dl/html/malloc.html</a></li>

     <li><a name="ref2" id="ref2">Paul R. Wilson, Mark S. Johnstone, Michael
     Neely, and David Boles, "Dynamic Storage Allocation: A Survey and
Critical Review" in <em>International Workshop on Memory Management</em>,
-    September 1995, pg. 28, 36.</a> Available on the web at <a href=
-    
"ftp://ftp.cs.utexas.edu/pub/garbage/allocsrv.ps";>ftp://ftp.cs.utexas.edu/pub/garbage/allocsrv.ps</a></li>
+ September 1995, pg. 28, 36.</a> Available on the web at <a href="ftp://ftp.cs.utexas.edu/pub/garbage/allocsrv.ps";>ftp://ftp.cs.utexas.edu/pub/garbage/allocsrv.ps</a></li>
   </ol>

-  <h2>Other Implementations</h2>
+  <h2>Other Implementations 其它实现</h2>

   <p>Pool allocators are found in many programming languages, and in many
   variations. The beginnings of many implementations may be found in common
@@ -328,37 +317,41 @@
   these are complete implementations of a Pool; most of these leave some
   aspects of a Pool as a user exercise. However, in each case, even though
some aspects are missing, these examples use the same underlying concept of
-  a Simple Segregated Storage described in this document.</p>
+  a Simple Segregated Storage described in this document.<br>内
+存池分配器在许多编程语言中都可以找到,有许多变种。在初期的许多实现中可以找 到相同的程序文字;其中一些在以下列出。注意,它们之中没有一个是内存池的 +完整实现;其中的大多数把内存池的某些方面留作用户的练习。不过,在每一个实现 中,虽然都有某个方面的缺失,但是这个范例都使用了在本文档中所描述的简单
+分隔存储的基本概念。</p>

   <ul>
     <li>"The C++ Programming Language", 3rd ed., by Bjarne Stroustrup,
-    Section 19.4.2. Missing aspects:
+ Section 19.4.2. Missing aspects:<br>"The C++ Programming Language", 第 三版,Bjarne Stroustrup,
+    第19.4.2节。缺点:

       <ol>
-        <li>Not portable</li>
+        <li>Not portable<br>不可移植</li>

         <li>Cannot handle allocations of arbitrary numbers of objects (this
-        was left as an exercise)</li>
+ was left as an exercise)<br>不能处理任意数量的对象的分配(这个问题被 留作练习了)</li>

-        <li>Not thread-safe</li>
+        <li>Not thread-safe<br>非线程安全的</li>

-        <li>Suffers from the static initialization problem</li>
+ <li>Suffers from the static initialization problem<br>存在静态初始 化问题</li>
       </ol>
     </li>

<li>"MicroC/OS-II: The Real-Time Kernel", by Jean J. Labrosse, Chapter 7
     and Appendix B.04. This is an example of the Simple Segregated Storage
-    scheme at work in the internals of an actual OS. Missing aspects:
+ scheme at work in the internals of an actual OS. Missing aspects:<br>"MicroC/OS-II: The Real-Time Kernel", Jean J. Labrosse, 第7章和 附录B.04. 这是一个在操作系统内部建立简单分隔存储机制的例子。缺点:

       <ol>
         <li>Not portable (though this is OK, since it's part of its own
-        OS)</li>
+        OS)<br>不可移植(由于它是操作系统的一部分,这还是OK的)</li>

         <li>Cannot handle allocations of arbitrary numbers of blocks (which
-        is also OK, since this feature is not needed)</li>
+ is also OK, since this feature is not needed)<br>不能处理任意数量的 对象的分配(由于不需要此特性,所以也还OK)</li>

         <li>Requires non-intuitive user code to create and destroy the
-        Pool</li>
+        Pool<br>要求非介入式用户代码创建和销毁内存池</li>
       </ol>
     </li>

@@ -367,41 +360,41 @@
     developing a Pool solution; however, their premise (that the
system-supplied allocation mechanism is hopelessly inefficient) is flawed
     on every system I've tested on. Run their timings on your system before
-    you accept their conclusions. Missing aspects:
+    you accept their conclusions. Missing aspects:<br>"Efficient
+C++: Performance Programming Techniques", Dov Bulka 和 David Mayhew,
+第6、7章。这是迭代式开发一个内存池方案的好例子;不过,它们的前提(系统提供的 分配机制极其低效)在我所测试的每个系统中都是有缺陷的。在你接受他们
+的结论之前,最好先在你的系统中运行一下他们的计时程序。缺点:

       <ol>
         <li>Requires non-intuitive user code to create and destroy the
-        Pool</li>
+        Pool<br>要求非介入式用户代码创建和销毁内存池</li>
       </ol>
     </li>

     <li>"Advanced C++: Programming Styles and Idioms", by James O. Coplien,
     Section 3.6. This has examples of both static and dynamic pooling.
-    Missing aspects:
+ Missing aspects:<br>"Advanced C++: Programming Styles and Idioms",&nbsp;James O. Coplien,
+    第3.6节。这里有静态和动态内存池的例子。缺点:

       <ol>
-        <li>Not thread-safe</li>
+        <li>Not thread-safe<br>非线程安全的</li>

-        <li>The static pooling example is not portable</li>
+ <li>The static pooling example is not portable<br>静态的内存池例子 不可移植</li>
       </ol>
     </li>
   </ul>
   <hr>

- <p><a href="http://validator.w3.org/check?uri=referer";><img border="0" src= - "http://www.w3.org/Icons/valid-html401"; alt="Valid HTML 4.01 Transitional"
-  height="31" width="88"></a></p>
+ <p><a href="http://validator.w3.org/check?uri=referer";><img style="border: 0px solid ; width: 88px; height: 31px;" src="../../../valid-html401.png" alt="Valid HTML 4.01 Transitional"></a></p>

   <p>Revised
<!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %B, %Y" startspan -->05 December, 2006<!--webbot bot="Timestamp" endspan i-checksum="38516" --></p>

- <p><i>Copyright &copy; 2000, 2001 Stephen Cleary (scleary AT jerviswebb DOT
+  <p><i>Copyright (c) 2000, 2001 Stephen Cleary (scleary AT jerviswebb DOT
   com)</i></p>

   <p><i>Distributed under the Boost Software License, Version 1.0. (See
accompanying file <a href="../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a> or
-  copy at <a href=
-  
"http://www.boost.org/LICENSE_1_0.txt";>http://www.boost.org/LICENSE_1_0.txt</a>)</i></p>
-</body>
-</html>
+ copy at <a href="http://www.boost.org/LICENSE_1_0.txt";>http://www.boost.org/LICENSE_1_0.txt</a>)</i></p>
+</body></html>
\ No newline at end of file

Modified: trunk/libs/pool/doc/implementation/alignment.html
==============================================================================
--- trunk/libs/pool/doc/implementation/alignment.html   (original)
+++ trunk/libs/pool/doc/implementation/alignment.html Wed May 27 01:51:16 2009
@@ -1,70 +1,66 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
-"http://www.w3.org/TR/html4/loose.dtd";>
-
-<html>
-<head>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd";>
+<html><head>
   <meta http-equiv="Content-Language" content="en-us">
-  <meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
+  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
   <link href="../pool.css" rel="stylesheet" type="text/css">

-  <title>Guaranteeing Alignment</title>
-</head>
-
+  <title>Guaranteeing Alignment</title></head>
 <body>
-  <img src="../../../../boost.png" width="276" height="86" alt="C++ Boost">
+  <img src="../../../../boost.png" alt="C++ Boost" height="86" width="276">

-  <h1 align="center">Guaranteeing Alignment</h1>
+  <h1 align="center">Guaranteeing Alignment 对齐保证</h1>

-  <h2>Terminology</h2>
+  <h2>Terminology 术语</h2>

   <p>Review the <a href="../concepts.html">concepts document</a> if you are
not already familiar with it. Remember that <em>block</em> is a contiguous
   section of memory, which is <em>partitioned</em> or <em>segregated</em>
   into fixed-size <em>chunks</em>. These <em>chunks</em> are what are
-  allocated and deallocated by the user.</p>
+ allocated and deallocated by the user.<br>如果你还不够熟悉,请重温一下 <a href="../concepts.html">概念文档</a>。请记住,<em>内存块block</em> 是一段 连续的内存,它被 <em>分区partitioned</em> 或 <em>分段segregated</em> + 为固定大小的 <em>区块chunks</em>。这些 <em>区块chunks</em> 用于分配给用户 和由用户释放。</p>

-  <h2>Overview</h2>
+  <h2>Overview 简介</h2>

   <p>Each <span class="code">Pool</span> has a single free list that can
extend over a number of memory blocks. Thus, <span class="code">Pool</span>
   also has a linked list of allocated memory blocks. Each memory block, by
default, is allocated using <span class="code">new[]</span>, and all memory
-  blocks are freed on destruction. It is the use of <span class=
-  "code">new[]</span> that allows us to guarantee alignment.</p>
+ blocks are freed on destruction. It is the use of <span class="code">new[]</span> that allows us to guarantee alignment.<br>每个内存 池都有一个单一的空闲列表,该列表可以扩展至多个内存块。因此,内存池还有一个已 分配内存块的链接列表。每个内存块缺省是使用 <span class="code">new[]</span> 分配的,且所有内存块在析构时释放。<span class="code">new[]</span> 的使用让我 们可以保证字节的对齐。</p>

-  <h2>Proof of Concept: Guaranteeing Alignment</h2>
+  <h2>Proof of Concept: Guaranteeing Alignment 概念论证:对齐保证</h2>

<p>Each block of memory is allocated as a POD type (specifically, an array
   of characters) through <span class="code">operator new[]</span>. Let
-  <em>POD_size</em> be the number of characters allocated.</p>
+ <em>POD_size</em> be the number of characters allocated.<br>每个内存块都 是作为一个POD类型(明确地说是一个字符数组)通过 <span class="code">operator new[]</span> 来分配的。令 <em>POD_size</em> 为分配的字符数量。</p>

-  <h3>Predicate 1: Arrays may not have padding</h3>
+  <h3>Predicate 1: Arrays may not have padding 断言1:数组不能有填充</h3>

-  <p>This follows from the following quote:</p>
+  <p>This follows from the following quote:<br>这一断言来自以下引用:</p>

- <p>[5.3.3/2] (Expressions::Unary expressions::Sizeof) &quot;... When applied to + <p>[5.3.3/2] (Expressions::Unary expressions::Sizeof) "... When applied to an array, the result is the total number of bytes in the array. This implies
   that the size of an array of <em>n</em> elements is <em>n</em>
-  times the size of an element.&quot;</p>
+ times the size of an element."<br>[5.3.3/2] (表达式::单参表达 式::Sizeof) "... 当被应用于一个数组时,其结果是该数组中的字节总数。这意味着 一个有 <em>n</em> 个元素的数组的大小为 <em>n</em>
+  乘以单个元素的大小。"</p>

<p>Therefore, arrays cannot contain padding, though the elements within the
-  arrays may contain padding.</p>
+ arrays may contain padding.<br>因此,数组不可能包含填充,但数组内部的元素 可以包含填充。</p>

   <h3>Predicate 2: Any block of memory allocated as an array of characters
through <span class="code">operator new[]</span> (hereafter referred to as
   <em>the block</em>) is properly aligned for any object of that size or
-  smaller</h3>
+ smaller 断言2:作为一个字符数组通过 operator new[] 分配的任何内存块(以下 称为<span style="font-style: italic;">该内存块</span>)都按该大小或更小的任意 对象正确对齐</h3>

-  <p>This follows from:</p>
+  <p>This follows from:<br>这一断言来自:</p>

   <ul>
     <li>[3.7.3.1/2] (Basic concepts::Storage duration::Dynamic storage
-    duration::Allocation functions) &quot;... The pointer returned shall be
+    duration::Allocation functions) "... The pointer returned shall be
suitably aligned so that it can be converted to a pointer of any complete
     object type and then used to access the object or array in the storage
-    allocated ...&quot;</li>
+ allocated ..."<br>[3.7.3.1/2] (基本概念::存储期间::动态存储期间::分配函 数) "... 返回的指针应适当地对齐,以使之可以被转换为任一完整对象类型的指 针,用于访问位于被分配内存中的对象或数组 ..."</li>

- <li>[5.3.4/10] (Expressions::Unary expressions::New) &quot;... For arrays of
+    <li>[5.3.4/10] (Expressions::Unary expressions::New) "... For arrays of
<span class="code">char</span> and <span class="code">unsigned char</span>,
     the difference between the result of the
     <em>new-expression</em> and the address returned by the allocation
@@ -74,108 +70,113 @@
functions are assumed to return pointers to storage that is appropriately
     aligned for objects of any type, this constraint on array allocation
     overhead permits the common idiom of allocating character arrays into
-    which objects of other types will later be placed. ]&quot;</li>
+ which objects of other types will later be placed. ]"<br>[5.3.4/10] (表 达式::单参表达式::New) "... 对于字符数组及无符号字符数组<span style="font-family: monospace;">,</span><em>new-表达式</em> 的结果和内存分 配函数返回的地址之间的差别应该是,大小不大于被创建数组的大小的任意对象类型的 最严格的对齐要求(3.9)的整数倍。[<em>注:</em>因为内存分配函数假定,返回的指 针将被用于保存任意类型的对象,它需要适当地对齐,在数组分配上的开销限制允许在 被分配的字符数组中保存其它类型的对象。]"</li>
   </ul>

   <h3>Consider: imaginary object type <em>Element</em> of a size which is a
- multiple of some actual object size; assume sizeof(Element) &gt; POD_size</h3> + multiple of some actual object size; assume sizeof(Element) &gt; POD_size 考虑:假设类型 <em>Element&nbsp;</em>的大小为某个实际对象大小的整数 倍;设&nbsp;sizeof(Element) &gt; POD_size</h3>

<p>Note that an object of that size <em>can</em> exist. One object of that
-  size is an array of the &quot;actual&quot; objects.</p>
+ size is an array of the "actual" objects.<br>注意,这一大小的对象可能存 在。这一大小的对象是"实际"对象的一个数组。</p>

   <p>Note that the block is properly aligned for an Element. This directly
-  follows from Predicate 2.</p>
+ follows from Predicate 2.<br>注意,内存块是按一个 Element 正确对齐的。这 可以从断言2直接得到。</p>

- <h3>Corollary 1: The block is properly aligned for an array of Elements</h3> + <h3>Corollary 1: The block is properly aligned for an array of Elements 推论1:该内存块按 Elements 数组适当对齐</h3>

-  <p>This follows from Predicates 1 and 2, and the following quote:</p>
+ <p>This follows from Predicates 1 and 2, and the following quote:<br>这可 以从断言1和断言2,以及以下引用得到:</p>

- <p>[3.9/9] (Basic concepts::Types) &quot;An <em>object type</em> is a (possibly + <p>[3.9/9] (Basic concepts::Types) "An <em>object type</em> is a (possibly
   cv-qualified) type that is not a function type, not a reference type, and
-  not a void type.&quot; (Specifically, array types are object types.)</p>
+ not a void type." (Specifically, array types are object types.)<br>[3.9/9] (基本概念::类型) "<em>对象类型</em> 是指这样的一个(可能带 有cv-限定)类型,它不是函数类型,不是引用类型,也不是 void 类型。" (即数组类 型是对象类型。)</p>

<h3>Corollary 2: For any pointer <em>p</em> and integer <em>i</em>, if p is properly aligned for the type it points to, then p + i (when well-defined) is properly aligned for that type; in other words, if an array is properly
-  aligned, then each element in that array is properly aligned</h3>
+ aligned, then each element in that array is properly aligned 推论2:对于 任意的指针 <span style="font-style: italic;">p</span> 和整数 <span style="font-style: italic;">i</span>,如果 p 对于其所指类型是正确对齐的,则 p + i (有良好定义时)对于该类型也是正确对齐的;换句话说,如果一个数组是正确对 齐的,则该数组中的每个元素都是正确对齐的</h3>

<p>There are no quotes from the Standard to directly support this argument, - but it fits the common conception of the meaning of &quot;alignment&quot;.</p> + but it fits the common conception of the meaning of "alignment".<br>在标 准中没有内容可以直接支持该论点,但是它符合对"对齐"意义的普遍认识。</p>

   <p>Note that the conditions for p + i being well-defined are outlined in
   [5.7/5]. We do not quote that here, but only make note that it is
- well-defined if p and p + i both point into or one past the same array.</p> + well-defined if p and p + i both point into or one past the same array.<br>注意,p + i 有良好定义这一条件在 + [5.7/5] 中有指出。这里我们不再引用,只要明白它有良好定义是指,p 和 p + i 均指向同一数组内部或末尾。</p>

   <h3>Let: sizeof(Element) be the least common multiple of sizes of several
-  actual objects (T<sub>1</sub>, T<sub>2</sub>, T<sub>3</sub>, ...)</h3>
+ actual objects (T<sub>1</sub>, T<sub>2</sub>, T<sub>3</sub>, ...) 令:sizeof(Element) 为多个实际对象 (T<sub>1</sub>, T<sub>2</sub>, T<sub>3</sub>, ...) 的大小的最小公倍数</h3>

   <h3>Let: <em>block</em> be a pointer to the memory block, <em>pe</em> be
- (Element *) block, and <em>p<sub>n</sub></em> be (T<sub>n</sub> *) block</h3> + (Element *) block, and <em>p<sub>n</sub></em> be (T<sub>n</sub> *) block 令:<span style="font-style: italic;">block</span> 为指向该内存块的指 针,<span style="font-style: italic;">pe</span> 为 (Element *) block, 且 <span style="font-style: italic;">pn</span> 为 (Tn *) block</h3>

   <h3>Corollary 3: For each integer <em>i</em>, such that pe + i is
   well-defined, then for each <em>n</em>, there exists some integer
   <em>j<sub>n</sub></em> such that p<sub>n</sub> + j<sub>n</sub> is
-  well-defined and refers to the same memory address as pe + i</h3>
+ well-defined and refers to the same memory address as pe + i 推论3:对于 满足 pe + i 有良好定义的每一个整数 <span style="font-style: italic;">i</span>,&nbsp;对于每个 <span style="font-style: italic;">n</span>, 存在某个整数 <span style="font-style: italic;">jn</span>,满足 pn + jn 有良好定义且引向与 pe + i 的同一内存地址 </h3>

<p>This follows naturally, since the memory block is an array of Elements,
   and for each n, sizeof(Element) % sizeof(T<sub>n</sub>) == 0; thus, the
boundary of each element in the array of Elements is also a boundary of each
-  element in each array of T<sub>n</sub>.</p>
+ element in each array of T<sub>n</sub>.<br>这是显然的,因为该内存块是一 个 Elements 数组,且对于每个 n, sizeof(Element) % sizeof(T<sub>n</sub>) == 0; 因此,Elements数组中的每个元素的边界也是每个 T<sub>n</sub> 数组中每个元素 的边界。</p>

<h3>Theorem: For each integer <em>i</em>, such that pe + i is well-defined, - that address (pe + i) is properly aligned for each type T<sub>n</sub></h3> + that address (pe + i) is properly aligned for each type T<sub>n 定理:对 于满足 pe + i 有良好定义的每个</sub>整数 <em>i</em>,地址 (pe + i) 对于每个 类型 T<sub>n 都是正确对齐的 </sub></h3>

<p>Since pe + i is well-defined, then by Corollary 3, p<sub>n</sub> + j<sub>n</sub> is well-defined. It is properly aligned from Predicate 2 and Corollaries 1
-  and 2.</p>
+ and 2.<br>因为 pe + i 有良好定义,则由推论3, p<sub>n</sub> + j<sub>n</sub>
+  有良好定义。从断言2及推论1和2,可以得到它是正确对齐的。</p>

-  <h2>Use of the Theorem</h2>
+  <h2>Use of the Theorem 上述定理的使用</h2>

<p>The proof above covers alignment requirements for cutting chunks out of a
-  block. The implementation uses actual object sizes of:</p>
+ block. The implementation uses actual object sizes of:<br>以上证明涉及了 从一个内存块中取出一个区块的对齐要求。本实现要用到实际对象的大小:</p>

   <ul>
<li>The requested object size (requested_size); this is the size of chunks
-    requested by the user</li>
+ requested by the user<br>被请求对象的大小(requested_size);这是用户所请 求的区块大小</li>

<li>void * (pointer to void); this is because we interleave our free list
-    through the chunks</li>
+ through the chunks<br>void * (void指针);这是因为我们的空闲列表要在不同 的区块间交错</li>

<li>size_type; this is because we store the size of the next block within
-    each memory block</li>
+ each memory block<br>size_type;这是因为我们要在每个内存块内部保存下一 个内存块的大小</li>
   </ul>

<p>Each block also contains a pointer to the next block; but that is stored
   as a pointer to void and cast when necessary, to simplify alignment
-  requirements to the three types above.</p>
+ requirements to the three types above.<br>每个内存块还包含了一个指针用于 指向下一个内存块;但是它是被保存为一个void指针,并在需要时进行转型,以简化以 上三种类型的对齐要求。</p>

<p>Therefore, <span class="code">alloc_size</span> is defined to be the lcm
-  of the sizes of the three types above.</p>
+ of the sizes of the three types above.<br>因此,<span class="code">alloc_size</span> 被定义为以上三种类型的大小的lcm。&nbsp;</p>

-  <h2>A Look at the Memory Block</h2>
+  <h2>A Look at the Memory Block 关于内存块</h2>

<p>Each memory block consists of three main sections. The first section is the part that chunks are cut out of, and contains the interleaved free list. The second section is the pointer to the next block, and the third section
-  is the size of the next block.</p>
+ is the size of the next block.<br>每个内存块包含三个主要部分。第一部分是 已被取出的区块,并包含交错空闲列表。第二部分是指向下一内存块的指针,第三部分 是下一内存块的大小。</p>

   <p>Each of these sections may contain padding as necessary to guarantee
   alignment for each of the next sections. The size of the first section is
number_of_chunks * lcm(requested_size, sizeof(void *), sizeof(size_type)); the size of the second section is lcm(sizeof(void *), sizeof(size_type); and
-  the size of the third section is sizeof(size_type).</p>
+  the size of the third section is sizeof(size_type).<br>这
+些部分中的每一个都会视下一部分的字节对齐要求而可能包含填充字节。第一部分的 大小为 number_of_chunks *
+lcm(requested_size, sizeof(void *), sizeof(size_type));第二部分的大小为
+lcm(sizeof(void *), sizeof(size_type));第三部分的大小为 sizeof(size_type)。</p>

<p>Here's an example memory block, where requested_size == sizeof(void *) == + sizeof(size_type) == 4:<br>以下是一个内存块的例子,其中 requested_size == sizeof(void *) ==
   sizeof(size_type) == 4:</p>

-  <table cellspacing="0" cellpadding="0" border="3" style="clear: both;"
-  align="center" summary="">
+ <table style="clear: both;" summary="" align="center" border="3" cellpadding="0" cellspacing="0">
     <caption>
       <em>Memory block containing 4 chunks, showing overlying array
       structures; FLP = Interleaved Free List Pointer</em>
     </caption>

-    <tr>
+    <tbody><tr>
       <th>Sections</th>

       <th>size_type alignment</th>
@@ -255,20 +256,20 @@
       <td style="background-color: red; text-align: center;" colspan="4">
       Memory not belonging to process</td>
     </tr>
-  </table>
+  </tbody></table>

   <p>To show a visual example of possible padding, here's an example memory
block where requested_size == 8 and sizeof(void *) == sizeof(size_type) == + 4:<br>下面看一个可能带填充字节的例子,该例子的内存块为 requested_size == 8 且 sizeof(void *) == sizeof(size_type) ==
   4:</p>

-  <table cellspacing="0" cellpadding="0" border="3" style="clear: both;"
-  align="center" summary="">
+ <table style="clear: both;" summary="" align="center" border="3" cellpadding="0" cellspacing="0">
     <caption>
       <em>Memory block containing 4 chunks, showing overlying array
       structures; FLP = Interleaved Free List Pointer</em>
     </caption>

-    <tr>
+    <tbody><tr>
       <th>Sections</th>

       <th>size_type alignment</th>
@@ -372,20 +373,20 @@
       <td style="background-color: red; text-align: center;" colspan="4">
       Memory not belonging to process</td>
     </tr>
-  </table>
+  </tbody></table>

   <p>Finally, here is a convoluted example where the requested_size is 7,
   sizeof(void *) == 3, and sizeof(size_type) == 5, showing how the least
   common multiple guarantees alignment requirements even in the oddest of
-  circumstances:</p>
+  circumstances:<br>最后是一个较复杂的例子,其中的 requested_size 为 7,
+ sizeof(void *) == 3, 而 sizeof(size_type) == 5, 以下显示了最小公倍数如何 在最怪异的情况下保证字节对齐:</p>

-  <table cellspacing="0" cellpadding="0" border="3" style="clear: both;"
-  align="center" summary="">
+ <table style="clear: both;" summary="" align="center" border="3" cellpadding="0" cellspacing="0">
     <caption>
<em>Memory block containing 2 chunks, showing overlying array structures</em>
     </caption>

-    <tr>
+    <tbody><tr>
       <th>Sections</th>

       <th>size_type alignment</th>
@@ -651,31 +652,32 @@
       <td style="background-color: red; text-align: center;" colspan="4">
       Memory not belonging to process</td>
     </tr>
-  </table>
+  </tbody></table>

-  <h2>How Contiguous Chunks are Handled</h2>
+  <h2>How Contiguous Chunks are Handled 如何处理连续区块</h2>

   <p>The theorem above guarantees all alignment requirements for allocating
   chunks and also implementation details such as the interleaved free list.
However, it does so by adding padding when necessary; therefore, we have to
-  treat allocations of contiguous chunks in a different way.</p>
+ treat allocations of contiguous chunks in a different way.<br>以上定理保 证了区块分配的所有对齐要求,以及交错空闲列表等实现细节。但是,它是通过在需要 时增加填充字节来做到这一点的;因此,我们必须以不同的方式来讨论连续区块的分 配。</p>

<p>Using array arguments similar to the above, we can translate any request
   for contiguous memory for <em>n</em> objects of requested_size into a
   request for <em>m</em> contiguous chunks. <em>m</em> is simply ceil(n *
   requested_size / alloc_size), where alloc_size is the actual size of the
-  chunks. To illustrate:</p>
+ chunks. To illustrate:<br>使用与上述相类似的数组参数,我们可以将任意的对 <em>n</em> 个 requested_size 大小的对象连续内存的请求,转换为一个对 <em>m</em> 个连续区块的请求。<em>m</em> 只是一个数字(n * + requested_size / alloc_size),其中 alloc_size 为区块的实际大小。示例如 下:</p>

<p>Here's an example memory block, where requested_size == 1 and sizeof(void + *) == sizeof(size_type) == 4:<br>以下是一个内存块的例子,其中 requested_size == 1 且 sizeof(void
   *) == sizeof(size_type) == 4:</p>

-  <table cellspacing="0" cellpadding="0" border="3" style="clear: both;"
-  align="center" summary="">
+ <table style="clear: both;" summary="" align="center" border="3" cellpadding="0" cellspacing="0">
     <caption>
       <em>Memory block containing 4 chunks; requested_size is 1</em>
     </caption>

-    <tr>
+    <tbody><tr>
       <th>Sections</th>

       <th>size_type alignment</th>
@@ -754,15 +756,14 @@
       <td style="background-color: red; text-align: center;" colspan="4">
       Memory not belonging to process</td>
     </tr>
-  </table>
+  </tbody></table>
 <br>
-  <table cellspacing="0" cellpadding="0" border="3" style="clear: both;"
-  align="center" summary="">
+ <table style="clear: both;" summary="" align="center" border="3" cellpadding="0" cellspacing="0">
     <caption>
       <em>After user requests 7 contiguous elements of requested_size</em>
     </caption>

-    <tr>
+    <tbody><tr>
       <th>Sections</th>

       <th>size_type alignment</th>
@@ -839,10 +840,10 @@
       <td style="background-color: red; text-align: center;" colspan="4">
       Memory not belonging to process</td>
     </tr>
-  </table>
+  </tbody></table>

<p>Then, when the user deallocates the contiguous memory, we can split it up
-  into chunks again.</p>
+ into chunks again.<br>然后,当用户释放这个连续内存时,我们可以把它重新分 割为区块。</p>

   <p>Note that the implementation provided for allocating contiguous chunks
   uses a linear instead of quadratic algorithm. This means that it
@@ -851,21 +852,18 @@
   dealing with contiguous allocation of chunks. (In the example above, if
Chunk 1 pointed to Chunk 3 pointed to Chunk 2 pointed to Chunk 4, instead of
   being in order, the contiguous allocation algorithm would have failed to
-  find any of the contiguous chunks).</p>
+ find any of the contiguous chunks).<br>注意,这个用于连续区块分配的实现使 用了一个线性算法来替代二次方程算法。这意味着如果空闲列表是无序的,它就 <strong>不能找到</strong>连续的空闲区块。因此,建议在需要处理连续区块分配的 时候,总是使用有序的空闲列表。(在上例中,如果 + Chunk 1 指向 Chunk 3 指向 Chunk 2 指向 Chunk 4,而不是有序的,那么该连续 区块算法将无法找到任何连续的区块)。</p>
   <hr>

- <p><a href="http://validator.w3.org/check?uri=referer";><img border="0" src= - "http://www.w3.org/Icons/valid-html401"; alt="Valid HTML 4.01 Transitional"
-  height="31" width="88"></a></p>
+ <p><a href="http://validator.w3.org/check?uri=referer";><img style="border: 0px solid ; width: 88px; height: 31px;" src="../../../../valid-html401.png" alt="Valid HTML 4.01 Transitional"></a></p>

   <p>Revised
<!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %B, %Y" startspan -->05 December, 2006<!--webbot bot="Timestamp" endspan i-checksum="38516" --></p>

- <p><i>Copyright &copy; 2000, 2001 Stephen Cleary (scleary AT jerviswebb DOT com)</i></p> + <p><i>Copyright (c) 2000, 2001 Stephen Cleary (scleary AT jerviswebb DOT com)</i></p>

   <p><i>Distributed under the Boost Software License, Version 1.0. (See
accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a>
-  or copy at <a href=
-  
"http://www.boost.org/LICENSE_1_0.txt";>http://www.boost.org/LICENSE_1_0.txt</a>)</i></p>
-</body>
-</html>
+ or copy at <a href="http://www.boost.org/LICENSE_1_0.txt";>http://www.boost.org/LICENSE_1_0.txt</a>)</i></p>
+</body></html>
\ No newline at end of file

Modified: trunk/libs/pool/doc/implementation/ct_gcd_lcm.html
==============================================================================
--- trunk/libs/pool/doc/implementation/ct_gcd_lcm.html  (original)
+++ trunk/libs/pool/doc/implementation/ct_gcd_lcm.html Wed May 27 01:51:16 2009
@@ -1,53 +1,33 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
-"http://www.w3.org/TR/html4/loose.dtd";>
-
-<html>
-<head>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd";>
+<html><head>
   <meta http-equiv="Content-Language" content="en-us">
-  <meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
+  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
   <link href="../pool.css" rel="stylesheet" type="text/css">

-  <title>ct_gcd_lcm - Compile-Time GCD and LCM</title>
-</head>
+  <title>ct_gcd_lcm - Compile-Time GCD and LCM</title></head>
+

 <body>
-  <img src="../../../../boost.png" width="276" height="86" alt="C++ Boost">
+  <img src="../../../../boost.png" alt="C++ Boost" height="86" width="276">

-  <h1 align="center">ct_gcd_lcm - Compile-Time GCD and LCM</h1>
+ <h1 align="center">ct_gcd_lcm - Compile-Time GCD and LCM 编译期GCD和 LCM</h1>

-  <h2>Introduction</h2>
+  <h2>Introduction 简介</h2>

   <p>detail/ct_gcd_lcm.hpp provides two compile-time algorithms: greatest
-  common divisor and least common multiple.</p>
+ common divisor and least common multiple.<br>detail/ct_gcd_lcm.hpp 提供了 两个编译期算法:最大公约数和最小公倍数。</p>

-  <h2>Synopsis</h2>
-  <pre class="code">
-namespace details {
-namespace pool {
-
-template &lt;unsigned A, unsigned B&gt;
-struct ct_gcd
-{
-  static const unsigned value = ...;
-};
-template &lt;unsigned A, unsigned B&gt;
-struct ct_lcm
-{
-  static const unsigned value = ...;
-};
-
-} // namespace pool
-} // namespace details
-</pre>
+  <h2>Synopsis 摘要</h2>
+ <pre class="code">namespace details {<br>namespace pool {<br><br>template &lt;unsigned A, unsigned B&gt;<br>struct ct_gcd<br>{<br> static const unsigned value = ...;<br>};<br>template &lt;unsigned A, unsigned B&gt;<br>struct ct_lcm<br>{<br> static const unsigned value = ...;<br>};<br><br>} // namespace pool<br>} // namespace details<br></pre>

-  <h2>Semantics</h2>
+  <h2>Semantics 语义</h2>

-  <table align="center" border summary="">
+  <table summary="" align="center" border="1">
     <caption>
       <em>Symbol Table</em>
     </caption>

-    <tr>
+    <tbody><tr>
       <th>Symbol</th>

       <th>Meaning</th>
@@ -56,17 +36,16 @@
     <tr>
       <td class="code">A, B</td>

-      <td>compile-time unsigned integer constants<a href=
-      "#s519p1"><sup>[5.19/1]</sup></a></td>
+ <td>compile-time unsigned integer constants<a href="ct_gcd_lcm.html#s519p1"><sup>[5.19/1]</sup></a><br>编译期无符号整型常 数<a href="#s519p1"><sup>[5.19/1]</sup></a></td>
     </tr>
-  </table><br>
+  </tbody></table><br>

-  <table align="center" border summary="">
+  <table summary="" align="center" border="1">
     <caption>
       <em>Semantics</em>
     </caption>

-    <tr>
+    <tbody><tr>
       <th>Expression</th>

       <th>Result Type</th>
@@ -79,10 +58,11 @@
     <tr>
       <td class="code">ct_gcd&lt;A, B&gt;::value</td>

-      <td>compile-time unsigned integer constant</td>
+ <td>compile-time unsigned integer constant<br>编译期无符号整型常数 </td>

       <td>The greatest common divisor of <span class="code">A</span> and
-      <span class="code">B</span></td>
+      <span class="code">B<br></span><span class="code">A</span> 和
+      <span class="code">B 的最大公约数</span></td>

       <td class="code">A != 0 &amp;&amp; B != 0</td>
     </tr>
@@ -90,33 +70,32 @@
     <tr>
       <td class="code">ct_lcm&lt;A, B&gt;::value</td>

-      <td>compile-time unsigned integer constant</td>
+ <td>compile-time unsigned integer constant<br>编译期无符号整型常数 </td>

       <td>The least common multiple of <span class="code">A</span> and
-      <span class="code">B</span></td>
+ <span class="code">B</span><span class="code"><br></span><span class="code">A</span> 和
+      <span class="code">B 的最小公倍数</span></td>

       <td class="code">A != 0 &amp;&amp; B != 0</td>
     </tr>
-  </table>
+  </tbody></table>

-  <h2>Notes</h2>
+  <h2>Notes 说明</h2>

<p>Since these are compile-time algorithms, violation of the preconditions
-  will result in a compile-time error.</p>
+ will result in a compile-time error.<br>由于这是编译期算法,违反先验条件 将导致编译期错误。</p>

-  <h2>Dependencies</h2>
+  <h2>Dependencies 相关性</h2>

   <ul>
-    <li>&lt;boost/static_assert.hpp&gt; (see <a href=
-    "../../../static_assert/static_assert.htm">Boost.Static_Assert</a>), to
-    ensure preconditions are met.</li>
-
-    <li>&lt;boost/type_traits/ice.hpp&gt; (see <a href=
- "http://www.boost.org/more/int_const_guidelines.htm";>Coding Guidelines for
-    Integral Constant Expressions</a>), to help with portability.</li>
+ <li>&lt;boost/static_assert.hpp&gt; (see <a href="../../../static_assert/static_assert.htm">Boost.Static_Assert</a>), to + ensure preconditions are met.<br>&lt;boost/static_assert.hpp&gt; (请见 <a href="../../../static_assert/static_assert.htm">Boost.Static_Assert</a>),确 保满足先验条件。</li>
+
+ <li>&lt;boost/type_traits/ice.hpp&gt; (see <a href="http://www.boost.org/more/int_const_guidelines.htm";>Coding Guidelines for + Integral Constant Expressions</a>), to help with portability.<br>&lt;boost/type_traits/ice.hpp&gt; (请见 <a href="http://www.boost.org/more/int_const_guidelines.htm";>整型常量表达式的编 码指引</a>),有助于可移植性。</li>
   </ul>

-  <h2>Selected Quotations from the Standard</h2>
+  <h2>Selected Quotations from the Standard 从标准中节选出来的说明</h2>

   <p><a name="s519p1" id="s519p1"></a><strong>5.19/1: Expressions: Constant
   Expressions:</strong> ". . . An <em>integral constant expression</em> can
@@ -126,31 +105,26 @@
   of integral or enumeration types, and <span class="code">sizeof</span>
expressions. Floating literals (2.13.3) can appear only if they are cast to
   integral or enumeration types. Only type conversions to integral or
-  enumeration types can be used. In particular, except in <span class=
-  "code">sizeof</span> expressions, functions, class objects, pointers, or
+ enumeration types can be used. In particular, except in <span class="code">sizeof</span> expressions, functions, class objects, pointers, or
   references shall not be used, and assignment, increment, decrement,
-  function-call, or comma operators shall not be used."</p>
+ function-call, or comma operators shall not be used."<br><strong>5.19/1: 表达式:常量表达式:</strong>". . . <em>整型常量表达式</em> 只能带有字面值 (2.13),枚举值,常变量,或是以常量表达式初始化(8.5)的整型或枚举类型的静态数 据成员,整型或枚举类型的非类型模板参数,以及 <span class="code">sizeof</span> 表达式。浮点字面值(2.13.3)仅当它们可以转为整型或 枚举类型时可以出现。只能使用可以转型为整型或枚举类型的类型。特别地,除了 <span class="code">sizeof</span> 表达式,函数、类对象、指针或引用都不能使 用,也不能使用赋值、递增、递减、函数调用或逗号操作符。"</p>

-  <h2>Future Directions</h2>
+  <h2>Future Directions 未来的方向</h2>

   <p>This header may be replaced by a Boost compile-time algorithms
-  library.</p>
+  library.<br>该头文件可能会被某个 Boost 编译期算法库替代。</p>
   <hr>

- <p><a href="http://validator.w3.org/check?uri=referer";><img border="0" src= - "http://www.w3.org/Icons/valid-html401"; alt="Valid HTML 4.01 Transitional"
-  height="31" width="88"></a></p>
+ <p><a href="http://validator.w3.org/check?uri=referer";><img src="http://www.w3.org/Icons/valid-html401"; alt="Valid HTML 4.01 Transitional" border="0" height="31" width="88"></a></p>

   <p>Revised
<!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %B, %Y" startspan -->05 December, 2006<!--webbot bot="Timestamp" endspan i-checksum="38516" --></p>

- <p><i>Copyright &copy; 2000, 2001 Stephen Cleary (scleary AT jerviswebb DOT
+  <p><i>Copyright (c) 2000, 2001 Stephen Cleary (scleary AT jerviswebb DOT
   com)</i></p>

   <p><i>Distributed under the Boost Software License, Version 1.0. (See
accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a>
-  or copy at <a href=
-  
"http://www.boost.org/LICENSE_1_0.txt";>http://www.boost.org/LICENSE_1_0.txt</a>)</i></p>
-</body>
-</html>
+ or copy at <a href="http://www.boost.org/LICENSE_1_0.txt";>http://www.boost.org/LICENSE_1_0.txt</a>)</i></p>
+</body></html>
\ No newline at end of file

Modified: trunk/libs/pool/doc/implementation/for.html
==============================================================================
--- trunk/libs/pool/doc/implementation/for.html (original)
+++ trunk/libs/pool/doc/implementation/for.html Wed May 27 01:51:16 2009
@@ -1,70 +1,65 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
-"http://www.w3.org/TR/html4/loose.dtd";>
-
-<html>
-<head>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd";>
+<html><head>
   <meta http-equiv="Content-Language" content="en-us">
-  <meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
+  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
   <link href="../pool.css" rel="stylesheet" type="text/css">

-  <title>for - m4 FOR Macro</title>
-</head>
+  <title>for - m4 FOR Macro</title></head>
+

 <body>
-  <img src="../../../../boost.png" width="276" height="86" alt="C++ Boost">
+  <img src="../../../../boost.png" alt="C++ Boost" height="86" width="276">

   <h1 align="center">for - m4 FOR Macro</h1>

-  <h2>Introduction</h2>
+  <h2>Introduction 简介</h2>

   <p>detail/for.m4 provides <span class="code">BOOST_M4_FOR</span>, an
-  <strong>m4</strong> macro that provides the equivalent of a <span class=
-  "code">#for</span> preprocessor instruction.</p>
+ <strong>m4</strong> macro that provides the equivalent of a <span class="code">#for</span> preprocessor instruction.<br>detail/for.m4 提供了 <span class="code">BOOST_M4_FOR</span>,它是一个 + <strong>m4</strong> 宏,提供了一个 <span class="code">#for</span> 预处理 器指令的等价物。</p>

-  <h2>Usage</h2>
+  <h2>Usage 用法</h2>

   <p>This macro must be used by an <strong>m4</strong> file. This file
   assumes that the option <span class="code">-P</span> is used, to force an
-  <span class="code">m4_</span> prefix on all builtin symbols.</p>
+ <span class="code">m4_</span> prefix on all builtin symbols.<br>该宏必须 由一个 <strong>m4</strong> 文件使用。该文件假定使用了 <span class="code">-P</span> 选项,以迫使在所有内建符号上有
+  <span class="code">m4_</span> 前缀。</p>

-  <h2>Arguments</h2>
+  <h2>Arguments 参数</h2>

   <ol>
-    <li>The name of a variable to hold the current value.</li>
+ <li>The name of a variable to hold the current value.<br>保存当前值的变 量名。</li>

-    <li>The starting value of the variable.</li>
+    <li>The starting value of the variable.<br>变量的开始值。</li>

-    <li>The ending value of the variable.</li>
+    <li>The ending value of the variable.<br>变量的结束值。</li>

<li>The text to repeat. This text may contain references to the variable,
-    which will be replaced with the variable's current value.</li>
+ which will be replaced with the variable's current value.<br>要重复的文 本。该文本可以含有对此变量的引用,它将被替换为变量的当前值。</li>

-    <li>The delimeter text (optional).</li>
+    <li>The delimeter text (optional).<br>分隔符文本(可选)。</li>
   </ol>

   <p>If called with the wrong number of arguments (less than 4 or more than
5), <span class="code">BOOST_M4_FOR</span> will exit with an error. If the
   starting value (<span class="code">$2</span>) is greater than or equal to
-  the ending value (<span class="code">$3</span>), <span class=
-  "code">BOOST_M4_FOR</span> will do nothing. Otherwise, it will repeat the
-  text (<span class="code">$4</span>), binding the variable (<span class=
- "code">$1</span>) to the values in the range [starting value (<span class= - "code">$2</span>), ending value (<span class="code">$3</span>)), and repeat + the ending value (<span class="code">$3</span>), <span class="code">BOOST_M4_FOR</span> will do nothing. Otherwise, it will repeat the + text (<span class="code">$4</span>), binding the variable (<span class="code">$1</span>) to the values in the range [starting value (<span class="code">$2</span>), ending value (<span class="code">$3</span>)), and repeat
   the delimeter text (<span class="code">$5</span>) in-between each
-  occurrence of the repeat text (<span class="code">$4</span>).</p>
+ occurrence of the repeat text (<span class="code">$4</span>).<br>如果调用 时给出错误的参数数量(少于4个或多于5个),<span class="code">BOOST_M4_FOR</span> 将错误退出。如果开始值(<span class="code">$2</span>)大于或等于结束值(<span class="code">$3</span>), <span class="code">BOOST_M4_FOR</span> 将不做任何事。否则,它将重复给定文本 (<span class="code">$4</span>),将变量(<span class="code">$1</span>)绑定至区 间[开始值(<span class="code">$2</span>),结束值(<span class="code">$3</span>))中的值,并在每次重复文本(<span class="code">$4</span>)出现之间重复分隔符文本(<span class="code">$5</span>)。</p>

-  <h2>Examples</h2>
+  <h2>Examples 示例</h2>

   <p>Note of the quotation marks (<span class="m4">"</span>) used in the
   table below are in the input or output; they are shown to delimit
whitespace. All code within a pair of quotation marks is intended to be on
-  one line.</p>
+ one line.<br>注意,下表的输入和输出中使用的引号(<span class="m4">"</span>);它们用于显示出分隔的空白符。在一对引号内的所有代码都是 在一行中的。</p>

-  <table border align="center" summary="">
-    <tr>
-      <th>Input</th>
+  <table summary="" align="center" border="1">
+    <tbody><tr>
+      <th>Input 输入</th>

-      <th>Output</th>
+      <th>Output 输出</th>
     </tr>

     <tr>
@@ -104,8 +99,7 @@
     </tr>

     <tr>
-      <td class="m4">"BOOST_M4_FOR(i, 0, 8, BOOST_M4_FOR(j, 0, 4, (i, j)
-      )"<br>
+ <td class="m4">"BOOST_M4_FOR(i, 0, 8, BOOST_M4_FOR(j, 0, 4, (i, j)<br> )"<br>
       ")"</td>

       <td class="m4">"(0, 0) (0, 1) (0, 2) (0, 3) "<br>
@@ -144,8 +138,7 @@
     </tr>

     <tr>
-      <td class="m4">"BOOST_M4_FOR(i, 0, 8, `[BOOST_M4_FOR(j, 0, 4, (i, j),
-      `, ')]', `,"<br>
+ <td class="m4">"BOOST_M4_FOR(i, 0, 8, `[BOOST_M4_FOR(j, 0, 4, (i, j),<br> `, ')]', `,"<br>
       "')"</td>

       <td class="m4">"[(0, 0), (0, 1), (0, 2), (0, 3)],"<br>
@@ -157,23 +150,19 @@
       "[(6, 0), (6, 1), (6, 2), (6, 3)],"<br>
       "[(7, 0), (7, 1), (7, 2), (7, 3)]"</td>
     </tr>
-  </table>
+  </tbody></table>
   <hr>

- <p><a href="http://validator.w3.org/check?uri=referer";><img border="0" src= - "http://www.w3.org/Icons/valid-html401"; alt="Valid HTML 4.01 Transitional"
-  height="31" width="88"></a></p>
+ <p><a href="http://validator.w3.org/check?uri=referer";><img src="http://www.w3.org/Icons/valid-html401"; alt="Valid HTML 4.01 Transitional" border="0" height="31" width="88"></a></p>

   <p>Revised
<!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %B, %Y" startspan -->05 December, 2006<!--webbot bot="Timestamp" endspan i-checksum="38516" --></p>

- <p><i>Copyright &copy; 2000, 2001 Stephen Cleary (scleary AT jerviswebb DOT
+  <p><i>Copyright (c) 2000, 2001 Stephen Cleary (scleary AT jerviswebb DOT
   com)</i></p>

   <p><i>Distributed under the Boost Software License, Version 1.0. (See
accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a>
-  or copy at <a href=
-  
"http://www.boost.org/LICENSE_1_0.txt";>http://www.boost.org/LICENSE_1_0.txt</a>)</i></p>
-</body>
-</html>
+ or copy at <a href="http://www.boost.org/LICENSE_1_0.txt";>http://www.boost.org/LICENSE_1_0.txt</a>)</i></p>
+</body></html>
\ No newline at end of file

Modified: trunk/libs/pool/doc/implementation/gcd_lcm.html
==============================================================================
--- trunk/libs/pool/doc/implementation/gcd_lcm.html     (original)
+++ trunk/libs/pool/doc/implementation/gcd_lcm.html     Wed May 27 01:51:16 2009
@@ -1,48 +1,33 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
-"http://www.w3.org/TR/html4/loose.dtd";>
-
-<html>
-<head>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd";>
+<html><head>
   <meta http-equiv="Content-Language" content="en-us">
-  <meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
+  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
   <link href="../pool.css" rel="stylesheet" type="text/css">

-  <title>gcd_lcm - GCD and LCM</title>
-</head>
+  <title>gcd_lcm - GCD and LCM</title></head>
+

 <body>
-  <img src="../../../../boost.png" width="276" height="86" alt="C++ Boost">
+  <img src="../../../../boost.png" alt="C++ Boost" height="86" width="276">

   <h1 align="center">gcd_lcm - GCD and LCM</h1>

-  <h2>Introduction</h2>
+  <h2>Introduction 简介</h2>

   <p>detail/gcd_lcm.hpp provides two generic integer algorithms: greatest
-  common divisor and least common multiple.</p>
-
-  <h2>Synopsis</h2>
-  <pre class="code">
-namespace details {
-namespace pool {
-
-template &lt;typename Integer&gt;
-Integer gcd(Integer A, Integer B);
+ common divisor and least common multiple.<br>detail/gcd_lcm.hpp 提供了两 个泛型的整数算法:最大公约数和最小公倍数。</p>

-template &lt;typename Integer&gt;
-Integer lcm(Integer A, Integer B);
+  <h2>Synopsis 摘要</h2>
+ <pre class="code">namespace details {<br>namespace pool {<br><br>template &lt;typename Integer&gt;<br>Integer gcd(Integer A, Integer B);<br><br>template &lt;typename Integer&gt;<br>Integer lcm(Integer A, Integer B);<br><br>} // namespace pool<br>} // namespace details<br></pre>

-} // namespace pool
-} // namespace details
-</pre>
+  <h2>Semantics 语义</h2>

-  <h2>Semantics</h2>
-
-  <table align="center" border summary="">
+  <table summary="" align="center" border="1">
     <caption>
       <em>Symbol Table</em>
     </caption>

-    <tr>
+    <tbody><tr>
       <th>Symbol</th>

       <th>Meaning</th>
@@ -59,14 +44,14 @@

       <td>Values of type <span class="code">Integer</span></td>
     </tr>
-  </table><br>
+  </tbody></table><br>

-  <table align="center" border summary="">
+  <table summary="" align="center" border="1">
     <caption>
       <em>Semantics</em>
     </caption>

-    <tr>
+    <tbody><tr>
       <th>Expression</th>

       <th>Result Type</th>
@@ -84,7 +69,7 @@
       <td class="code">A &gt; 0 &amp;&amp; B &gt; 0</td>

<td>Returns the greatest common divisor of <span class="code">A</span>
-      and <span class="code">B</span></td>
+      and <span class="code">B<br>返回 A 和 B 的最大公约数</span></td>
     </tr>

     <tr>
@@ -95,37 +80,33 @@
       <td class="code">A &gt; 0 &amp;&amp; B &gt; 0</td>

       <td>Returns the least common multiple of <span class="code">A</span>
-      and <span class="code">B</span></td>
+ and <span class="code">B<br></span><span class="code">返回 A 和 B 的 最小公倍数</span></td>
     </tr>
-  </table>
+  </tbody></table>

-  <h2>Implementation Notes</h2>
+  <h2>Implementation Notes 实现说明</h2>

-  <p>For faster results, ensure <span class="code">A &gt; B</span></p>
+ <p>For faster results, ensure <span class="code">A &gt; B<br></span>为了 更快的速度,请确保 <span class="code">A &gt; B</span></p>

-  <h2>Dependencies</h2>
+  <h2>Dependencies 相关性</h2>

-  <p>None.</p>
+  <p>None.<br>无。</p>

-  <h2>Future Directions</h2>
+  <h2>Future Directions 未来的方向</h2>

-  <p>This header may be replaced by a Boost algorithms library.</p>
+ <p>This header may be replaced by a Boost algorithms library.<br>该头文件 可能会被一个 Boost 算法库所替代。</p>
   <hr>

- <p><a href="http://validator.w3.org/check?uri=referer";><img border="0" src= - "http://www.w3.org/Icons/valid-html401"; alt="Valid HTML 4.01 Transitional"
-  height="31" width="88"></a></p>
+ <p><a href="http://validator.w3.org/check?uri=referer";><img src="http://www.w3.org/Icons/valid-html401"; alt="Valid HTML 4.01 Transitional" border="0" height="31" width="88"></a></p>

   <p>Revised
<!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %B, %Y" startspan -->05 December, 2006<!--webbot bot="Timestamp" endspan i-checksum="38516" --></p>

- <p><i>Copyright &copy; 2000, 2001 Stephen Cleary (scleary AT jerviswebb DOT
+  <p><i>Copyright (c) 2000, 2001 Stephen Cleary (scleary AT jerviswebb DOT
   com)</i></p>

   <p><i>Distributed under the Boost Software License, Version 1.0. (See
accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a>
-  or copy at <a href=
-  
"http://www.boost.org/LICENSE_1_0.txt";>http://www.boost.org/LICENSE_1_0.txt</a>)</i></p>
-</body>
-</html>
+ or copy at <a href="http://www.boost.org/LICENSE_1_0.txt";>http://www.boost.org/LICENSE_1_0.txt</a>)</i></p>
+</body></html>
\ No newline at end of file

Modified: trunk/libs/pool/doc/implementation/guard.html
==============================================================================
--- trunk/libs/pool/doc/implementation/guard.html       (original)
+++ trunk/libs/pool/doc/implementation/guard.html       Wed May 27 01:51:16 2009
@@ -1,57 +1,35 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
-"http://www.w3.org/TR/html4/loose.dtd";>
-
-<html>
-<head>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd";>
+<html><head>
   <meta http-equiv="Content-Language" content="en-us">
-  <meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
+  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
   <link href="../pool.css" rel="stylesheet" type="text/css">

-  <title>guard - Auto-lock/unlock-er</title>
-</head>
+  <title>guard - Auto-lock/unlock-er</title></head>
+

 <body>
-  <img src="../../../../boost.png" width="276" height="86" alt="C++ Boost">
+  <img src="../../../../boost.png" alt="C++ Boost" height="86" width="276">

   <h1 align="center">guard - Auto-lock/unlock-er</h1>

-  <h2>Introduction</h2>
+  <h2>Introduction 简介</h2>

-  <p>detail/guard.hpp provides a type <span class=
-  "code">guard&lt;Mutex&gt;</span> that allows scoped access to the
+ <p>detail/guard.hpp provides a type <span class="code">guard&lt;Mutex&gt;</span> that allows scoped access to the
   <span class="code">Mutex</span>'s locking and unlocking operations. It is
used to ensure that a <span class="code">Mutex</span> is unlocked, even if
-  an exception is thrown.</p>
+ an exception is thrown.<br>detail/guard.hpp 提供了一个类型 <span class="code">guard&lt;Mutex&gt;</span>,它可以对 <span class="code">Mutex</span> 的锁定和解锁操作进行定域的访问。它用于确保一个 <span class="code">Mutex</span> 即使在有异常抛出的情况下也会被解锁。</p>

-  <h2>Synopsis</h2>
-  <pre class="code">
-namespace details {
-namespace pool {
-
-template &lt;typename Mutex&gt;
-class guard
-{
-  private:
-    guard(const guard &amp;);
-    void operator=(const guard &amp;);
-
-  public:
-    explicit guard(Mutex &amp; mtx);
-    ~guard();
-};
-
-} // namespace pool
-} // namespace details
-</pre>
+  <h2>Synopsis 摘要</h2>
+ <pre class="code">namespace details {<br>namespace pool {<br><br>template &lt;typename Mutex&gt;<br>class guard<br>{<br> private:<br> guard(const guard &amp;);<br> void operator=(const guard &amp;);<br><br> public:<br> explicit guard(Mutex &amp; mtx);<br> ~guard();<br>};<br><br>} // namespace pool<br>} // namespace details<br></pre>

-  <h2>Semantics</h2>
+  <h2>Semantics 语义</h2>

-  <table border align="center" summary="">
+  <table summary="" align="center" border="1">
     <caption>
       <em>Symbol Table</em>
     </caption>

-    <tr>
+    <tbody><tr>
       <th>Symbol</th>

       <th>Meaning</th>
@@ -74,14 +52,14 @@

       <td>value of type <span class="code">guard&lt;Mutex&gt;</span></td>
     </tr>
-  </table><br>
+  </tbody></table><br>

-  <table border align="center" summary="">
+  <table summary="" align="center" border="1">
     <caption>
       <em>Requirements on <span class="code">Mutex</span></em>
     </caption>

-    <tr>
+    <tbody><tr>
       <th>Expression</th>

       <th>Return Type</th>
@@ -94,7 +72,7 @@

       <td>not used</td>

-      <td>Locks the mutex referred to by <span class="code">m</span></td>
+ <td>Locks the mutex referred to by <span class="code">m<br></span>锁 定由 <span class="code">m</span> 指向的互斥体<span class="code"></span></td>
     </tr>

     <tr>
@@ -102,16 +80,16 @@

       <td>not used</td>

-      <td>Unlocks the mutex referred to by <span class="code">m</span></td>
+ <td>Unlocks the mutex referred to by <span class="code">m</span><span class="code"><br></span>解锁由 <span class="code">m</span> 指向的互斥体</td>
     </tr>
-  </table><br>
+  </tbody></table><br>

-  <table border align="center" summary="">
+  <table summary="" align="center" border="1">
     <caption>
       <em>Requirements satisfied by <span class="code">guard</span></em>
     </caption>

-    <tr>
+    <tbody><tr>
       <th>Expression</th>

       <th>Assertion/Note/Pre/Post-Condition</th>
@@ -121,59 +99,42 @@
       <td class="code">T(m)</td>

       <td>Locks the mutex referred to by <span class="code">m</span>; binds
-      <span class="code">T(m)</span> to <span class="code">m</span></td>
+ <span class="code">T(m)</span> to <span class="code">m</span><span class="code"><br></span>锁定由 <span class="code">m</span> 指向的互斥体,将 <span class="code">T(m)</span> 绑定至 <span class="code">m</span></td>
     </tr>

     <tr>
       <td class="code">(&amp;g)-&gt;~T()</td>

- <td>Unlocks the mutex that <span class="code">g</span> is bound to</td> + <td>Unlocks the mutex that <span class="code">g</span> is bound to<span class="code"></span><span class="code"><br></span>解锁 <span class="code">g</span> 所绑定的互斥体</td>
     </tr>
-  </table>
+  </tbody></table>

-  <h2>Example</h2>
+  <h2>Example 示例</h2>

   <p>Given a (platform-specific) <span class="code">mutex</span> class, we
-  can wrap code as follows:</p>
-  <pre class="code">
-extern mutex global_lock;
-
-static void f()
-{
-  boost::details::pool::guard&lt;mutex&gt; g(global_lock);
-  // g's constructor locks "global_lock"
-
-  ... // do anything:
-      //   throw exceptions
-      //   return
-      //   or just fall through
-} // g's destructor unlocks "global_lock"
-</pre>
+ can wrap code as follows:<br>给定一个(平台相关)的互斥体类,我们可以如下包 装代码:</p> + <pre class="code">extern mutex global_lock;<br><br>static void f()<br>{<br> boost::details::pool::guard&lt;mutex&gt; g(global_lock);<br> // g's constructor locks "global_lock"<br><br> ... // do anything:<br> // throw exceptions<br> // return<br> // or just fall through<br>} // g's destructor unlocks "global_lock"<br></pre>

-  <h2>Dependencies</h2>
+  <h2>Dependencies 相关性</h2>

-  <p>None.</p>
+  <p>None.<br>无。</p>

-  <h2>Future Directions</h2>
+  <h2>Future Directions 未来的方向</h2>

   <p>This header will eventually be replaced by a Boost multithreading
-  library.</p>
+  library.<br>该头文件最终会被一个 Boost 多线程库所替代。</p>
   <hr>

- <p><a href="http://validator.w3.org/check?uri=referer";><img border="0" src= - "http://www.w3.org/Icons/valid-html401"; alt="Valid HTML 4.01 Transitional"
-  height="31" width="88"></a></p>
+ <p><a href="http://validator.w3.org/check?uri=referer";><img src="http://www.w3.org/Icons/valid-html401"; alt="Valid HTML 4.01 Transitional" border="0" height="31" width="88"></a></p>

   <p>Revised
<!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %B, %Y" startspan -->05 December, 2006<!--webbot bot="Timestamp" endspan i-checksum="38516" --></p>

- <p><i>Copyright &copy; 2000, 2001 Stephen Cleary (scleary AT jerviswebb DOT
+  <p><i>Copyright (c) 2000, 2001 Stephen Cleary (scleary AT jerviswebb DOT
   com)</i></p>

   <p><i>Distributed under the Boost Software License, Version 1.0. (See
accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a>
-  or copy at <a href=
-  
"http://www.boost.org/LICENSE_1_0.txt";>http://www.boost.org/LICENSE_1_0.txt</a>)</i></p>
-</body>
-</html>
+ or copy at <a href="http://www.boost.org/LICENSE_1_0.txt";>http://www.boost.org/LICENSE_1_0.txt</a>)</i></p>
+</body></html>
\ No newline at end of file

Modified: trunk/libs/pool/doc/implementation/mutex.html
==============================================================================
--- trunk/libs/pool/doc/implementation/mutex.html       (original)
+++ trunk/libs/pool/doc/implementation/mutex.html       Wed May 27 01:51:16 2009
@@ -1,100 +1,43 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
-"http://www.w3.org/TR/html4/loose.dtd";>
-
-<html>
-<head>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd";>
+<html><head>
   <meta http-equiv="Content-Language" content="en-us">
-  <meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
+  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
   <link href="../pool.css" rel="stylesheet" type="text/css">

-  <title>mutex - Mutex</title>
-</head>
-
+  <title>mutex - Mutex</title></head>
 <body>
-  <img src="../../../../boost.png" width="276" height="86" alt="C++ Boost">
+  <img src="../../../../boost.png" alt="C++ Boost" height="86" width="276">

   <h1 align="center">mutex - Mutex</h1>

-  <h2>Introduction</h2>
+  <h2>Introduction 简介</h2>

<p>detail/mutex.hpp provides several mutex types that provide a consistent interface for OS-supplied mutex types. These are all thread-level mutexes;
-  interprocess mutexes are not supported.</p>
+ interprocess mutexes are not supported.<br>detail/mutex.hpp 提供了几个互 斥体类型,为不同操作系统所支持的互斥体类型提供了统一的接口。它们全都是线程级 的互斥体;不支持进程间的互斥体。</p>

-  <h2>Configuration</h2>
+  <h2>Configuration 配置</h2>

<p>This header file will try to guess what kind of system it is on. It will
   auto-configure itself for Win32 or POSIX+pthread systems. To stub out all
   mutex code, bypassing the auto-configuration, <span class="code">#define
   BOOST_NO_MT</span> before any inclusion of this header. To prevent ODR
   violations, this should be defined in <strong>every</strong> translation
-  unit in your project, including any library files.</p>
+ unit in your project, including any library files.<br>这个头文件会尝试猜 测所处的操作系统类型。它对于 Win32 或 POSIX+pthread 系统可以自动配置。要保留 所有互斥体代码,绕过自动配置,请在包含该头文件之前 <span class="code">#define
+  BOOST_NO_MT</span>。要阻止 ODR
+ 行为,它应该在你的项目中的<strong>每个</strong>编译单元中定义,包括所有库 文件。</p>

-  <h2>Synopsis</h2>
-  <pre class="code">
-namespace details {
-namespace pool {
-
-// Only present if on a Win32 system
-class Win32_mutex
-{
-  private:
-    Win32_mutex(const Win32_mutex &amp;);
-    void operator=(const Win32_mutex &amp;);
-
-  public:
-    Win32_mutex();
-    ~Win32_mutex();
-
-    void lock();
-    void unlock();
-};
-
-// Only present if on a POSIX+pthread system
-class pthread_mutex
-{
-  private:
-    pthread_mutex(const pthread_mutex &amp;);
-    void operator=(const pthread_mutex &amp;);
-
-  public:
-    pthread_mutex();
-    ~pthread_mutex();
-
-    void lock();
-    void unlock();
-};
-
-// Present on all systems
-class null_mutex
-{
-  private:
-    null_mutex(const null_mutex &amp;);
-    void operator=(const null_mutex &amp;);
-
-  public:
-    null_mutex();
-    ~null_mutex();
-
-    static void lock();
-    static void unlock();
-};
-
-// This will be one of the types above
-typedef ... default_mutex;
-
-} // namespace pool
-} // namespace details
-</pre>
+  <h2>Synopsis 摘要</h2>
+ <pre class="code">namespace details {<br>namespace pool {<br><br>// Only present if on a Win32 system<br>class Win32_mutex<br>{<br> private:<br> Win32_mutex(const Win32_mutex &amp;);<br> void operator=(const Win32_mutex &amp;);<br><br> public:<br> Win32_mutex();<br> ~Win32_mutex();<br><br> void lock();<br> void unlock();<br>};<br><br>// Only present if on a POSIX+pthread system<br>class pthread_mutex<br>{<br> private:<br> pthread_mutex(const pthread_mutex &amp;);<br> void operator=(const pthread_mutex &amp;);<br><br> public:<br> pthread_mutex();<br> ~pthread_mutex();<br><br> void lock();<br> void unlock();<br>};<br><br>// Present on all systems<br>class null_mutex<br>{<br> private:<br> null_mutex(const null_mutex &amp;);<br> void operator=(const null_mutex &amp;);<br><br> public:<br> null_mutex();<br> ~null_mutex();<br><br> static void lock();<br> static void unlock();<br>};<br><br>// This will be one of the types above<br>typedef ... default_mutex;<br><br>} // namespace pool<br>} // namespace details<br></pre>

-  <h2>Semantics</h2>
+  <h2>Semantics 语义</h2>

-  <table border align="center" summary="">
+  <table summary="" align="center" border="1">
     <caption>
       <em>Symbol Table</em>
     </caption>

-    <tr>
+    <tbody><tr>
       <th>Symbol</th>

       <th>Meaning</th>
@@ -111,14 +54,14 @@

       <td>value of type <span class="code">Mutex</span></td>
     </tr>
-  </table><br>
+  </tbody></table><br>

-  <table border align="center" summary="">
+  <table summary="" align="center" border="1">
     <caption>
       <em>Requirements satisfied by <span class="code">mutex</span></em>
     </caption>

-    <tr>
+    <tbody><tr>
       <th>Expression</th>

       <th>Return Type</th>
@@ -141,42 +84,35 @@

       <td>Unlocks the mutex</td>
     </tr>
-  </table>
+  </tbody></table>

<p>Each mutex is always either owned or unowned. If owned, then it is owned by a particular thread. To "lock" a mutex means to wait until the mutex is unowned, and then make it owned by the current thread. To "unlock" a mutex
   means to release ownership from the current thread (note that the current
thread <strong>must</strong> own the mutex to release that ownership!). As
-  a special case, the <span class="code">null_mutex</span> never waits.</p>
+ a special case, the <span class="code">null_mutex</span> never waits.<br>每个互斥体要么是有主的,要么是无主的。如果是有主的,则它由某个特定 的线程所拥有。"锁定"一个互斥体意味着等待,直至该互斥体变为无主,然后令其被当 前线程拥有。"解锁"一个互斥体则意味着从当前线程释放它的拥有权(注意,当前线程 <strong>必须</strong>要拥有被释放的互斥体!)。一个特殊情况是,<span class="code">null_mutex</span> 永远不会等待。</p>

-  <h2>Dependencies</h2>
+  <h2>Dependencies 相关性</h2>

-  <p>May include the system headers <span class=
-  "code">&lt;windows.h&gt;</span>, <span class=
-  "code">&lt;unistd.h&gt;</span>, and/or <span class=
-  "code">&lt;pthread.h&gt;</span>.</p>
+ <p>May include the system headers <span class="code">&lt;windows.h&gt;</span>, <span class="code">&lt;unistd.h&gt;</span>, and/or <span class="code">&lt;pthread.h&gt;</span>.<br>可能包含系统头文件 <span class="code">&lt;windows.h&gt;</span>, <span class="code">&lt;unistd.h&gt;</span>, 和/或 <span class="code">&lt;pthread.h&gt;</span>.</p>

-  <h2>Future Directions</h2>
+  <h2>Future Directions 未来的方向</h2>

   <p>This header will eventually be replaced by a Boost multithreading
-  library.</p>
+  library.<br>该头文件最终会被一个 Boost 多线程库所替代。</p>
   <hr>

- <p><a href="http://validator.w3.org/check?uri=referer";><img border="0" src= - "http://www.w3.org/Icons/valid-html401"; alt="Valid HTML 4.01 Transitional"
-  height="31" width="88"></a></p>
+ <p><a href="http://validator.w3.org/check?uri=referer";><img src="http://www.w3.org/Icons/valid-html401"; alt="Valid HTML 4.01 Transitional" border="0" height="31" width="88"></a></p>

   <p>Revised
<!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %B, %Y" startspan -->05 December, 2006<!--webbot bot="Timestamp" endspan i-checksum="38516" --></p>

- <p><i>Copyright &copy; 2000, 2001 Stephen Cleary (scleary AT jerviswebb DOT
+  <p><i>Copyright (c) 2000, 2001 Stephen Cleary (scleary AT jerviswebb DOT
   com)</i></p>

   <p><i>Distributed under the Boost Software License, Version 1.0. (See
accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a>
-  or copy at <a href=
-  
"http://www.boost.org/LICENSE_1_0.txt";>http://www.boost.org/LICENSE_1_0.txt</a>)</i></p>
-</body>
-</html>
+ or copy at <a href="http://www.boost.org/LICENSE_1_0.txt";>http://www.boost.org/LICENSE_1_0.txt</a>)</i></p>
+</body></html>
\ No newline at end of file

Modified: trunk/libs/pool/doc/implementation/object_pool.html
==============================================================================
--- trunk/libs/pool/doc/implementation/object_pool.html (original)
+++ trunk/libs/pool/doc/implementation/object_pool.html Wed May 27 01:51:16 2009
@@ -1,85 +1,70 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
-"http://www.w3.org/TR/html4/loose.dtd";>
-
-<html>
-<head>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd";>
+<html><head>
   <meta http-equiv="Content-Language" content="en-us">
-  <meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
+  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
   <link href="../pool.css" rel="stylesheet" type="text/css">

-  <title>Object Pool Implementation</title>
-</head>
+  <title>Object Pool Implementation</title></head>
+

 <body>
-  <img src="../../../../boost.png" width="276" height="86" alt="C++ Boost">
+  <img src="../../../../boost.png" alt="C++ Boost" height="86" width="276">

-  <h1 align="center">Object Pool Implementation</h1>
+  <h1 align="center">Object Pool Implementation 对象内存池实现</h1>

-  <h2>Dependencies</h2>
+  <h2>Dependencies 相关性</h2>

   <p>Includes the Boost header <span class="code">"pool.hpp"</span> (see
+ <a href="pool.html">pool.html</a>).<br>包含了 Boost 头文件 <span class="code">"pool.hpp"</span> (请见
   <a href="pool.html">pool.html</a>).</p>

-  <h2>Extensions to Public Interface</h2>
+  <h2>Extensions to Public Interface 公有接口的扩展</h2>

   <p>Whenever an object of type <span class="code">ObjectPool</span> needs
-  memory from the system, it will request it from its <span class=
-  "code">UserAllocator</span> template parameter. The amount requested is
+ memory from the system, it will request it from its <span class="code">UserAllocator</span> template parameter. The amount requested is
   determined using a doubling algorithm; that is, each time more system
   memory is allocated, the amount of system memory requested is doubled.
   Users may control the doubling algorithm by using the following
-  extensions.</p>
+ extensions.<br>当一个类型为 <span class="code">ObjectPool</span> 的对象需 要从系统获得内存时,它将从它的 <span class="code">UserAllocator</span> 模板 参数进行申请。申请的内存数量通过一个倍增算法来确定;即每次进行系统内存分配 时,系统内存的请求数量被加倍。用户可以通过使用以下扩展来控制该倍增算法。</p>

-  <h3>Additional constructor parameter</h3>
+  <h3>Additional constructor parameter 额外的构造函数参数</h3>

-  <p>Users may pass an additional constructor parameter to <span class=
-  "code">ObjectPool</span>. This parameter is of type <span class=
-  "code">size_type</span>, and is the number of chunks to request from the
+ <p>Users may pass an additional constructor parameter to <span class="code">ObjectPool</span>. This parameter is of type <span class="code">size_type</span>, and is the number of chunks to request from the
   system the first time that object needs to allocate system memory. The
-  default is 32. This parameter may not be 0.</p>
+ default is 32. This parameter may not be 0.<br>用户可以传递一个额外的构造 函数参数给 <span class="code">pool</span>. 该参数的类型为 <span class="code">size_type</span>, 它是该对象首次需要分配系统内存时请求的区块数 量。缺省值为32。该参数不能为0。</p>

-  <h3><span class="code">next_size</span> accessor functions</h3>
+ <h3><span class="code">next_size</span> accessor functions <span class="code">&nbsp;next_size</span> 访问器函数</h3>

   <p>The pair of functions <span class="code">size_type get_next_size()
const;</span> and <span class="code">void set_next_size(size_type);</span>
-  allow users to explicitly read and write the <span class=
-  "code">next_size</span> value. This value is the number of chunks to
+ allow users to explicitly read and write the <span class="code">next_size</span> value. This value is the number of chunks to request from the system the next time that object needs to allocate system
-  memory. This value should never be set to 0.</p>
+ memory. This value should never be set to 0.<br>这是一对函数 <span class="code">size_type get_next_size()
+  const;</span> 和 <span class="code">void set_next_size(size_type);</span>
+ 它们允许用户显式地读取和设置 <span class="code">next_size</span> 的值。该 值为该对象需要再次分配系统内存时请求的区块数量。该值不能被设置为0。</p>
+
+  <h2>Protected Interface 保护性接口</h2>

-  <h2>Protected Interface</h2>
+  <h3>Synopsis 摘要</h3>
+ <pre class="code">template &lt;typename ElementType, typename UserAllocator = default_user_allocator_new_delete&gt;<br>class object_pool: protected pool&lt;UserAllocator&gt;<br>{<br> ... // public interface<br>};<br></pre>

-  <h3>Synopsis</h3>
-  <pre class="code">
-template &lt;typename ElementType, typename UserAllocator = default_user_allocator_new_delete&gt;
-class object_pool: protected pool&lt;UserAllocator&gt;
-{
-  ... // public interface
-};
-</pre>
-
-  <h3>Protected Derivation</h3>ObjectPool derives from a simple segregated
-  storage via protected derivation; this exposes all the <a href=
-  "pool.html">Pool implementation details</a> to all classes derived from
-  ObjectPool as well.
+ <h3>Protected Derivation 保护性继承</h3>ObjectPool derives from a simple segregated + storage via protected derivation; this exposes all the <a href="pool.html">Pool implementation details</a> to all classes derived from + ObjectPool as well.<br>ObjectPool&nbsp;保护式地继承自一个简单分隔存储;这 样可以向所有继承自&nbsp;ObjectPool 的类公开 <a href="simple_segregated_storage.html">简单分隔存储的所有实现细节</a>。

- <h2><a href="../interfaces/object_pool.html">Interface Description</a></h2> + <h2><a href="../interfaces/object_pool.html">Interface Description 接口描 述</a></h2>
   <hr>

- <p><a href="http://validator.w3.org/check?uri=referer";><img border="0" src= - "http://www.w3.org/Icons/valid-html401"; alt="Valid HTML 4.01 Transitional"
-  height="31" width="88"></a></p>
+ <p><a href="http://validator.w3.org/check?uri=referer";><img src="http://www.w3.org/Icons/valid-html401"; alt="Valid HTML 4.01 Transitional" border="0" height="31" width="88"></a></p>

   <p>Revised
<!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %B, %Y" startspan -->05 December, 2006<!--webbot bot="Timestamp" endspan i-checksum="38516" --></p>

- <p><i>Copyright &copy; 2000, 2001 Stephen Cleary (scleary AT jerviswebb DOT
+  <p><i>Copyright (c) 2000, 2001 Stephen Cleary (scleary AT jerviswebb DOT
   com)</i></p>

   <p><i>Distributed under the Boost Software License, Version 1.0. (See
accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a>
-  or copy at <a href=
-  
"http://www.boost.org/LICENSE_1_0.txt";>http://www.boost.org/LICENSE_1_0.txt</a>)</i></p>
-</body>
-</html>
+ or copy at <a href="http://www.boost.org/LICENSE_1_0.txt";>http://www.boost.org/LICENSE_1_0.txt</a>)</i></p>
+</body></html>
\ No newline at end of file

Modified: trunk/libs/pool/doc/implementation/pool.html
==============================================================================
--- trunk/libs/pool/doc/implementation/pool.html        (original)
+++ trunk/libs/pool/doc/implementation/pool.html        Wed May 27 01:51:16 2009
@@ -1,119 +1,50 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
-"http://www.w3.org/TR/html4/loose.dtd";>
-
-<html>
-<head>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd";>
+<html><head>
   <meta http-equiv="Content-Language" content="en-us">
-  <meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
+  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
   <link href="../pool.css" rel="stylesheet" type="text/css">

-  <title>Pool Implementation</title>
-</head>
-
+  <title>Pool Implementation</title></head>
 <body>
-  <img src="../../../../boost.png" width="276" height="86" alt="C++ Boost">
+  <img src="../../../../boost.png" alt="C++ Boost" height="86" width="276">
+
+  <h1 align="center">Pool Implementation 内存池的实现</h1>

-  <h1 align="center">Pool Implementation</h1>
+  <h2>Dependencies 相关性</h2>

-  <h2>Dependencies</h2>
+ <p>Includes the system headers <span class="code">&lt;functional&gt;</span>, <span class="code">&lt;new&gt;</span>, + <span class="code">&lt;cstddef&gt;</span>, <span class="code">&lt;cstdlib&gt;</span>, and <span class="code">&lt;exception&gt;</span>.<br>包含系统头文件 <span class="code">&lt;functional&gt;</span>, <span class="code">&lt;new&gt;</span>, + <span class="code">&lt;cstddef&gt;</span>, <span class="code">&lt;cstdlib&gt;</span>, 和 <span class="code">&lt;exception&gt;</span>.</p>

-  <p>Includes the system headers <span class=
-  "code">&lt;functional&gt;</span>, <span class="code">&lt;new&gt;</span>,
-  <span class="code">&lt;cstddef&gt;</span>, <span class=
-  "code">&lt;cstdlib&gt;</span>, and <span class=
-  "code">&lt;exception&gt;</span>.</p>
-
-  <p>Includes the Boost headers <span class=
-  "code">"detail/ct_gcd_lcm.hpp"</span> (see <a href=
-  "ct_gcd_lcm.html">ct_gcd_lcm.html</a>), <span class=
-  "code">"detail/gcd_lcm.hpp"</span> (see <a href=
-  "gcd_lcm.html">gcd_lcm.html</a>), and <span class=
-  "code">"simple_segregated_storage.hpp"</span> (see <a href=
-  "simple_segregated_storage.html">simple_segregated_storage.html</a>).</p>
-
-  <h2>Synopsis</h2>
-  <pre class="code">
-namespace details {
-
-template &lt;typename SizeType&gt;
-class PODptr
-{
-  public:
-    typedef SizeType size_type;
-
-    PODptr(char * ptr, size_type size);
-    PODptr();
-
-    // Copy constructor, assignment operator, and destructor allowed
-
-    bool valid() const;
-    void invalidate();
-    char * &amp; begin();
-    char * begin() const;
-    char * end() const;
-    size_type total_size() const;
-    size_type element_size() const;
-
-    size_type &amp; next_size() const;
-    char * &amp; next_ptr() const;
-
-    PODptr next() const;
-    void next(const PODptr &amp; arg) const;
-};
-
-} // namespace details
-
-template &lt;typename UserAllocator = default_user_allocator_new_delete&gt;
-class pool: protected simple_segregated_storage&lt;typename UserAllocator::size_type&gt;
-{
-  ... // public interface
-
-  protected:
-    details::PODptr&lt;size_type&gt; list;
-
-    simple_segregated_storage&lt;size_type&gt; &amp; store();
-    const simple_segregated_storage&lt;size_type&gt; &amp; store() const;
-
-    const size_type requested_size;
-    size_type next_size;
-
-    details::PODptr&lt;size_type&gt; find_POD(void * chunk) const;
-    static bool is_from(void * chunk, char * i, size_type sizeof_i);
-    size_type alloc_size() const;
-
-  public: // extensions to public interface
-    pool(size_type requested_size, size_type next_size);
-    size_type get_next_size() const;
-    void set_next_size(size_type);
-};
-</pre>
+ <p>Includes the Boost headers <span class="code">"detail/ct_gcd_lcm.hpp"</span> (see <a href="ct_gcd_lcm.html">ct_gcd_lcm.html</a>), <span class="code">"detail/gcd_lcm.hpp"</span> (see <a href="gcd_lcm.html">gcd_lcm.html</a>), and <span class="code">"simple_segregated_storage.hpp"</span> (see <a href="simple_segregated_storage.html">simple_segregated_storage.html</a>).<br>包 含 Boost 头文件 <span class="code">"detail/ct_gcd_lcm.hpp"</span> (请见 <a href="ct_gcd_lcm.html">ct_gcd_lcm.html</a>), <span class="code">"detail/gcd_lcm.hpp"</span> (请见 <a href="gcd_lcm.html">gcd_lcm.html</a>), 和 <span class="code">"simple_segregated_storage.hpp"</span> (请见 <a href="simple_segregated_storage.html">simple_segregated_storage.html</a>).</p>

-  <h2>Extensions to Public Interface</h2>
+  <h2>Synopsis 摘要</h2>
+ <pre class="code">namespace details {<br><br>template &lt;typename SizeType&gt;<br>class PODptr<br>{<br> public:<br> typedef SizeType size_type;<br><br> PODptr(char * ptr, size_type size);<br> PODptr();<br><br> // Copy constructor, assignment operator, and destructor allowed<br><br> bool valid() const;<br> void invalidate();<br> char * &amp; begin();<br> char * begin() const;<br> char * end() const;<br> size_type total_size() const;<br> size_type element_size() const;<br><br> size_type &amp; next_size() const;<br> char * &amp; next_ptr() const;<br><br> PODptr next() const;<br> void next(const PODptr &amp; arg) const;<br>};<br><br>} // namespace details<br><br>template &lt;typename UserAllocator = default_user_allocator_new_delete&gt;<br>class pool: protected simple_segregated_storage&lt;typename UserAllocator::size_type&gt;<br>{<br> ... // public interface<br><br> protected:<br> details::PODptr&lt;size_type&gt; list;<br><br> simple_segregated_storage&lt;size_type&gt; &amp; store();<br> const simple_segregated_storage&lt;size_type&gt; &amp; store() const;<br><br> const size_type requested_size;<br> size_type next_size;<br><br> details::PODptr&lt;size_type&gt; find_POD(void * chunk) const;<br> static bool is_from(void * chunk, char * i, size_type sizeof_i);<br> size_type alloc_size() const;<br><br> public: // extensions to public interface<br> pool(size_type requested_size, size_type next_size);<br> size_type get_next_size() const;<br> void set_next_size(size_type);<br>};<br></pre>
+
+  <h2>Extensions to Public Interface 对公用接口的扩展</h2>

   <p>Whenever an object of type <span class="code">pool</span> needs memory
-  from the system, it will request it from its <span class=
-  "code">UserAllocator</span> template parameter. The amount requested is
+ from the system, it will request it from its <span class="code">UserAllocator</span> template parameter. The amount requested is
   determined using a doubling algorithm; that is, each time more system
   memory is allocated, the amount of system memory requested is doubled.
   Users may control the doubling algorithm by using the following
-  extensions.</p>
+ extensions.<br>每当一个类型 <span class="code">pool</span> 的对象需要从系 统获得内存时,它就会从它的 <span class="code">UserAllocator</span> 模板参数 进行请求。请求的内存数量使用一个倍增算法来确定;即每一次需要更多内存时,请求 的系统内存数量加倍。用户可以通过以下扩展来控制这个倍增算法。</p>

-  <h3>Additional constructor parameter</h3>
+  <h3>Additional constructor parameter 额外的构造函数参数</h3>

-  <p>Users may pass an additional constructor parameter to <span class=
-  "code">pool</span>. This parameter is of type <span class=
-  "code">size_type</span>, and is the number of chunks to request from the
+ <p>Users may pass an additional constructor parameter to <span class="code">pool</span>. This parameter is of type <span class="code">size_type</span>, and is the number of chunks to request from the
   system the first time that object needs to allocate system memory. The
-  default is 32. This parameter may not be 0.</p>
+ default is 32. This parameter may not be 0.<br>用户可以传递一个额外的构造 函数参数给 <span class="code">pool</span>. 该参数的类型为 <span class="code">size_type</span>, 它是该对象首次需要分配系统内存时请求的区块数 量。缺省值为32。该参数不能为0。</p>

-  <h3><span class="code">next_size</span> accessor functions</h3>
+ <h3><span class="code">next_size</span> accessor functions &nbsp;<span class="code">next_size</span> 访问器函数</h3>

   <p>The pair of functions <span class="code">size_type get_next_size()
const;</span> and <span class="code">void set_next_size(size_type);</span>
-  allow users to explicitly read and write the <span class=
-  "code">next_size</span> value. This value is the number of chunks to
+ allow users to explicitly read and write the <span class="code">next_size</span> value. This value is the number of chunks to request from the system the next time that object needs to allocate system
-  memory. This value should never be set to 0.</p>
+ memory. This value should never be set to 0.<br>这是一对函数 <span class="code">size_type get_next_size()
+  const;</span> 和 <span class="code">void set_next_size(size_type);</span>
+ 它们允许用户显式地读取和设置 <span class="code">next_size</span> 的值。该 值为该对象需要再次分配系统内存时请求的区块数量。该值不能被设置为0。</p>

   <h2>Class <span class="code">PODptr</span></h2>

@@ -121,113 +52,109 @@
   "pointer" to different class types that don't really exist. It provides
   member functions to access the "data" of the "object" it points to. Since
these "class" types are of differing sizes, and contain some information at
-  the end of their memory (for alignment reasons), <span class=
-  "code">PODptr</span> must contain the size of this "class" as well as the
-  pointer to this "object".</p>
+ the end of their memory (for alignment reasons), <span class="code">PODptr</span> must contain the size of this "class" as well as the + pointer to this "object".<br><span class="code">PODptr</span> 是一个佯装 为"指针"的类,用于区分实际不存在的类类型。它提供了成员函数来访问所指"对 象"的"数据"。由于这些"类"类型具有不同的大小,并含有关于其内存末尾的信息(由于 对齐的原因),所以 <span class="code">PODptr</span> 必须包含这个"类"的大小以 及指向这个"对象"的指针。</p>

   <p>A <span class="code">PODptr</span> holds the location and size of a
   memory block allocated from the system. Each memory block is split
-  logically into three sections:</p>
+ logically into three sections:<br>一个 <span class="code">PODptr</span> 持有从系统分配的内存块的位置和大小。每个内存块在逻辑上被分割以下三部分:</p>

   <ol>
-    <li>Chunk area. This section may be different sizes. <span class=
- "code">PODptr</span> does not care what the size of the chunks is, but it
-    does care (and keep track of) the total size of the chunk area.</li>
+ <li>Chunk area. This section may be different sizes. <span class="code">PODptr</span> does not care what the size of the chunks is, but it + does care (and keep track of) the total size of the chunk area.<br>区块 部分。这一部分可以有不同的大小。<span class="code">PODptr </span>不关心区块 的大小,它只关心(并跟踪)整个区块部分的总大小。</li>

     <li>Next pointer. This section is always the same size for a given
<span class="code">SizeType</span>. It holds a pointer to the location of the next memory block in the memory block list, or 0 if there is no such
-    block.</li>
+    block.<br>下一个内存块的指针。该部分对于给定的
+ <span class="code">SizeType</span> 总是具有相同的大小。它保存了一个指向 内存块链表中下一个内存块位置的指针,如果没有下一内存块则为 0。</li>

     <li>Next size. This section is always the same size for a given
<span class="code">SizeType</span>. It holds the size of the next memory
-    block in the memory block list.</li>
+    block in the memory block list.<br>下一个内存块的大小。该部分对于给定的
+ <span class="code">SizeType</span> 总是具有相同的大小。它保存了内存块链 表中下一个内存块的大小。</li>
   </ol>

<p>The <span class="code">PODptr</span> class just provides cleaner ways of
-  dealing with raw memory blocks.</p>
+ dealing with raw memory blocks.<br><span class="code">PODptr</span> 类只 是提供了处理裸内存块的一个较干净的方法。</p>

-  <h3>Validity</h3>
+  <h3>Validity 有效性</h3>

   <p>A <span class="code">PODptr</span> object is either <em>valid</em> or
<em>invalid</em>. An invalid <span class="code">PODptr</span> is analogous
-  to a null pointer.</p>
+ to a null pointer.<br>一个 <span class="code">PODptr</span> 对象要么是 <em>有效的</em>,要么是 + <em>无效的</em>。无效的 <span class="code">PODptr</span> 类似于空指针。 </p>

<p>The default constructor for <span class="code">PODptr</span> will result
-  in an invalid object. Calling the member function <span class=
-  "code">invalidate</span> will result in that object becoming invalid. The
+ in an invalid object. Calling the member function <span class="code">invalidate</span> will result in that object becoming invalid. The
   member function <span class="code">valid</span> can be used to test for
-  validity.</p>
+ validity.<br><span class="code">PODptr</span> 的缺省构造函数生成一个无效 对象。调用成员函数 <span class="code">invalidate</span> 将导致该对象变为无 效。成员函数 <span class="code">valid</span> 可用于测试有效性。</p>

-  <h3>Getting <span class="code">PODptr</span> objects</h3>
+ <h3>Getting <span class="code">PODptr</span> objects 取出 PODptr 对象 </h3>

   <p>A <span class="code">PODptr</span> may be created to point to a memory
   block by passing the address and size of that memory block into the
constructor. A <span class="code">PODptr</span> constructed in this way is
-  valid.</p>
+ valid.<br>一个 <span class="code">PODptr</span> 可以在创建时通过向其构造 函数传入一个内存块的地址和大小,来使它指向该内存块。以此方式创建的 <span class="code">PODptr</span> 是有效的。</p>

<p>A <span class="code">PODptr</span> may also be created by a call to the
   member function <span class="code">next</span>, which returns a
   <span class="code">PODptr</span> which points to the next memory block in
   the memory block list, or an invalid <span class="code">PODptr</span> if
-  there is no such block.</p>
+ there is no such block.<br>一个 <span class="code">PODptr</span> 也可以通 过调用成员函数 <span class="code">next</span> 来创建,该函数返回一个指向内存 块链表中下一个内存块的 + <span class="code">PODptr</span>,或者如果不存在这样的内存块,则返回一个 无效的 <span class="code">PODptr</span>。</p>

-  <h3>Accessing the "pointer" data</h3>
+  <h3>Accessing the "pointer" data 访问"pointer"数据</h3>

<p>Each <span class="code">PODptr</span> keeps the address and size of its
   memory block. The address may be read or written by the member functions
   <span class="code">begin</span>. The size of the memory block may only be
-  read, and is done so by the member function <span class=
-  "code">total_size</span>.</p>
+ read, and is done so by the member function <span class="code">total_size</span>.<br>每个 <span class="code">PODptr</span> 都 保存有它的内存块的地址和大小。该地址可以通过成员函数 <span class="code">begin</span> 来读取或写入。而内存块的大小则只能通过成员函数 <span class="code">total_size</span> 来读取。</p>

-  <h3>Accessing the sections of the memory block</h3>
+  <h3>Accessing the sections of the memory block 访问内存块部分</h3>

-  <p>The chunk area may be accessed by the member functions <span class=
- "code">begin</span> and <span class="code">end</span>, in conjunction with - <span class="code">element_size</span>. The value returned by <span class=
-  "code">end</span> is always the value returned by <span class=
-  "code">begin</span> plus <span class="code">element_size</span>. Only
+ <p>The chunk area may be accessed by the member functions <span class="code">begin</span> and <span class="code">end</span>, in conjunction with + <span class="code">element_size</span>. The value returned by <span class="code">end</span> is always the value returned by <span class="code">begin</span> plus <span class="code">element_size</span>. Only <span class="code">begin</span> is writeable. <span class="code">end</span>
-  is a past-the-end value; using pointers beginning at <span class=
- "code">begin</span> and ending before <span class="code">end</span> allows
-  one to iterate through the chunks in a memory block.</p>
+ is a past-the-end value; using pointers beginning at <span class="code">begin</span> and ending before <span class="code">end</span> allows + one to iterate through the chunks in a memory block.<br>区块部分可以通过 成员函数 <span class="code">begin</span> 和 <span class="code">end</span> 以 + <span class="code">element_size</span> 来访问。<span class="code">end</span> 的返回值总是相等于 <span class="code">begin</span> 的返回值加上 <span class="code">element_size</span>。只有
+  <span class="code">begin</span> 是可写的。<span class="code">end</span>
+ 是一个越过尾部的值;使用由 <span class="code">begin</span> 开始,至 <span class="code">end</span> 之前结束的指针,就可以对一个内存块中的区块进行 迭代。</p>

   <p>The next pointer area may be accessed by the member function
   <span class="code">next_ptr</span>. The next size area may be accessed by
the member function <span class="code">next_size</span>. Both of these are writeable. They may both be read or set at the same time through the member
-  function <span class="code">next</span>.</p>
+ function <span class="code">next</span>.<br>下一个内存块的指针部分可以通 过成员函数 <span class="code">next_ptr</span> 来访问。下一个内存块的大小部分 则可以通过成员函数 <span class="code">next_size</span> 来访问。它们两个都是 可写的。它们可以通过成员函数 <span class="code">next</span> 来同时进行读写。 </p>

-  <h2>Protected Interface</h2>
+  <h2>Protected Interface 保护性接口</h2>

- <h3>Protected Derivation</h3>Pool derives from a simple segregated storage
-  via protected derivation; this exposes all the <a href=
-  "simple_segregated_storage.html">simple segregated storage implementation
-  details</a> to all classes derived from Pool as well.
+ <h3>Protected Derivation 保护性继承</h3>Pool derives from a simple segregated storage + via protected derivation; this exposes all the <a href="simple_segregated_storage.html">simple segregated storage implementation + details</a> to all classes derived from Pool as well.<br>Pool&nbsp;保护式 地继承自一个简单分隔存储;这样可以向所有继承自&nbsp;Pool 的类公开 <a href="simple_segregated_storage.html">简单分隔存储的所有实现细节</a>。

   <h3 class="code">details::PODptr&lt;size_type&gt; list;</h3>

<p>This is the list of memory blocks that have been allocated by this Pool
   object. It is <strong>not</strong> the same as the list of free memory
-  chunks (exposed by simple segregated storage as <span class=
-  "code">first</span>).</p>
+ chunks (exposed by simple segregated storage as <span class="code">first</span>).<br>这是已通过该 Pool 对象分配的内存块的链表。它 与空闲内存区块链表(由简单分隔存储<span style="font-family: monospace;">提供 </span><span class="code"></span>)是<strong>不同</strong>的。</p>

   <h3><span class="code">store</span> functions</h3>

   <p>These are convenience functions, used to return the base simple
-  segregated storage object.</p>
+ segregated storage object.<br>这些是一些便利性函数,用于返回简单分隔存储 的基类对象。</p>

   <h3 class="code">const size_type requested_size;</h3>

<p>The first argument passed into the constructor. Represents the number of
   bytes in each chunk requested by the user. The actual size of the chunks
-  may be different; see <span class="code">alloc_size</span>, below.</p>
+ may be different; see <span class="code">alloc_size</span>, below.<br>传 给构造函数的第一个参数。表示用户所请求的每个区块的字节数。区块的实际大小可能 与之不同;请见下面的 <span class="code">alloc_size</span>。</p>

   <h3 class="code">size_type next_size</h3>

-  <p>The number of chunks to request from the <span class=
-  "code">UserAllocator</span> the next time we need to allocate system
-  memory. See the extensions descriptions, above.</p>
+ <p>The number of chunks to request from the <span class="code">UserAllocator</span> the next time we need to allocate system + memory. See the extensions descriptions, above.<br>下一次我们需要分配系统 内存时,由 <span class="code">UserAllocator</span> 请求的区块数量。请见前面 的"扩展"一节。</p>

   <h3 class="code">details::PODptr&lt;size_type&gt; find_POD(void * chunk)
   const;</h3>
@@ -237,49 +164,45 @@
   in the future. Returns that block if found, or an invalid value if
<span class="code">chunk</span> has been allocated from another Pool or may
   be allocated from another Pool in the future. Results for other values of
-  <span class="code">chunk</span> may be wrong.</p>
+ <span class="code">chunk</span> may be wrong.<br>搜索内存块链表,查找 <span class="code">chunk</span> 从其中分配或者将从其中分配的内存块。如果找 到,返回该内存块,如果 + <span class="code">chunk</span> 是从或将从其它 Pool 分配的,返回一个无效 值。对于其它
+  <span class="code">chunk</span> 值,返回结果可能是错误的。</p>

   <h3 class="code">static bool is_from(void * chunk, char * i, size_type
   sizeof_i);</h3>

   <p>Tests <span class="code">chunk</span> to see if it has been allocated
   from the memory chunk at <span class="code">i</span> with an element size
-  of <span class="code">sizeof_i</span>. Note that <span class=
- "code">sizeof_i</span> is the size of the chunk area of that block, not the
-  total size of that block.</p>
-
-  <p>Returns <span class="code">true</span> if <span class=
-  "code">chunk</span> has been allocated from that memory block or may be
-  allocated from that block in the future. Returns <span class=
-  "code">false</span> if <span class="code">chunk</span> has been allocated
+ of <span class="code">sizeof_i</span>. Note that <span class="code">sizeof_i</span> is the size of the chunk area of that block, not the + total size of that block.<br>测试 <span class="code">chunk</span>,看它是 否从位于为 <span class="code">i</span> 的内存块中分配且具有元素大小 <span class="code">sizeof_i</span>。注意,<span class="code">sizeof_i</span> 是该 内存块的区块部分大小,不是整个内存块的大小。</p>
+
+ <p>Returns <span class="code">true</span> if <span class="code">chunk</span> has been allocated from that memory block or may be + allocated from that block in the future. Returns <span class="code">false</span> if <span class="code">chunk</span> has been allocated
   from another block or may be allocated from another block in the future.
   Results for other values of <span class="code">chunk</span> may be
-  wrong.</p>
+ wrong.<br>如果 <span class="code">chunk</span> 是从或将从该内存块中分配 的,则返回 <span class="code">true</span>。如果 <span class="code">chunk</span> 是从或将从另一内存块中分配的,则返回 <span class="code">false</span>。对于其它 <span class="code">chunk</span> 值,返回 结果可能是错误的。</p>

   <h3 class="code">size_type alloc_size() const;</h3>

<p>Returns the calculated size of the memory chunks that will be allocated
   by this Pool. For <a href="alignment.html">alignment reasons</a>, this is
   defined to be <span class="code">lcm(requested_size, sizeof(void *),
-  sizeof(size_type))</span>.</p>
+ sizeof(size_type))</span>.<br>返回将由该 Pool 分配的内存区块的可计算大 小。由于 <a href="alignment.html">对齐的原因</a>,该大小被定义为 <span class="code">lcm(requested_size, sizeof(void *),
+  sizeof(size_type))</span>。</p>

-  <h2><a href="../interfaces/pool.html">Interface Description</a></h2>
+ <h2><a href="../interfaces/pool.html">Interface Description 接口描述 </a></h2>
   <hr>

- <p><a href="http://validator.w3.org/check?uri=referer";><img border="0" src= - "http://www.w3.org/Icons/valid-html401"; alt="Valid HTML 4.01 Transitional"
-  height="31" width="88"></a></p>
+ <p><a href="http://validator.w3.org/check?uri=referer";><img src="http://www.w3.org/Icons/valid-html401"; alt="Valid HTML 4.01 Transitional" border="0" height="31" width="88"></a></p>

   <p>Revised
<!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %B, %Y" startspan -->05 December, 2006<!--webbot bot="Timestamp" endspan i-checksum="38516" --></p>

- <p><i>Copyright &copy; 2000, 2001 Stephen Cleary (scleary AT jerviswebb DOT
+  <p><i>Copyright (c) 2000, 2001 Stephen Cleary (scleary AT jerviswebb DOT
   com)</i></p>

   <p><i>Distributed under the Boost Software License, Version 1.0. (See
accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a>
-  or copy at <a href=
-  
"http://www.boost.org/LICENSE_1_0.txt";>http://www.boost.org/LICENSE_1_0.txt</a>)</i></p>
-</body>
-</html>
+ or copy at <a href="http://www.boost.org/LICENSE_1_0.txt";>http://www.boost.org/LICENSE_1_0.txt</a>)</i></p>
+</body></html>
\ No newline at end of file

Modified: trunk/libs/pool/doc/implementation/pool_alloc.html
==============================================================================
--- trunk/libs/pool/doc/implementation/pool_alloc.html  (original)
+++ trunk/libs/pool/doc/implementation/pool_alloc.html Wed May 27 01:51:16 2009
@@ -1,111 +1,63 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
-"http://www.w3.org/TR/html4/loose.dtd";>
-
-<html>
-<head>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd";>
+<html><head>
   <meta http-equiv="Content-Language" content="en-us">
-  <meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
+  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
   <link href="../pool.css" rel="stylesheet" type="text/css">

-  <title>pool_alloc - Boost Pool Standard Allocators Implementation</title>
-</head>
+ <title>pool_alloc - Boost Pool Standard Allocators Implementation</title></head>
+

 <body>
-  <img src="../../../../boost.png" width="276" height="86" alt="C++ Boost">
+  <img src="../../../../boost.png" alt="C++ Boost" height="86" width="276">

   <h1 align="center">pool_alloc - Boost Pool Standard Allocators
-  Implementation</h1>
+  Implementation &nbsp; Boost Pool 标准分配器实现</h1>

-  <h2>Dependencies</h2>
+  <h2>Dependencies 相关性</h2>

   <p>Includes the system headers <span class="code">&lt;new&gt;</span> and
+ <span class="code">&lt;limits&gt;</span>.<br>包含了系统头文件 <span class="code">&lt;new&gt;</span> 和
   <span class="code">&lt;limits&gt;</span>.</p>

-  <p>Includes the Boost headers <span class=
-  "code">"singleton_pool.hpp"</span> (see <a href=
-  "singleton_pool.html">singleton_pool.html</a>) and <span class=
-  "code">"detail/mutex.hpp"</span> (see <a href=
-  "mutex.html">mutex.html</a>).</p>
-
-  <h2>Synopsis</h2>
-  <pre class="code">
-template &lt;typename T,
-    typename UserAllocator = default_user_allocator_new_delete,
-    typename Mutex = details::pool::default_mutex,
-    unsigned NextSize = 32&gt;
-class pool_allocator
-{
-  public:
-    ... // public interface
-
-  public: // extensions to public interface
-    typedef Mutex mutex;
-    static const unsigned next_size = NextSize;
-
-    template &lt;typename U&gt;
-    struct rebind
-    {
- typedef pool_allocator&lt;U, UserAllocator, Mutex, NextSize&gt; other;
-    };
-};
-
-template &lt;typename T,
-    typename UserAllocator = default_user_allocator_new_delete,
-    typename Mutex = details::pool::default_mutex,
-    unsigned NextSize = 32&gt;
-class fast_pool_allocator
-{
-  public:
-    ... // public interface
-
-  public: // extensions to public interface
-    typedef Mutex mutex;
-    static const unsigned next_size = NextSize;
-
-    template &lt;typename U&gt;
-    struct rebind
-    {
- typedef fast_pool_allocator&lt;U, UserAllocator, Mutex, NextSize&gt; other;
-    };
-};
-</pre>
+ <p>Includes the Boost headers <span class="code">"singleton_pool.hpp"</span> (see <a href="singleton_pool.html">singleton_pool.html</a>) and <span class="code">"detail/mutex.hpp"</span> (see <a href="mutex.html">mutex.html</a>).<br>包含了 Boost 头文件 <span class="code">"singleton_pool.hpp"</span> (请见 <a href="singleton_pool.html">singleton_pool.html</a>) 和 <span class="code">"detail/mutex.hpp"</span> (请见 <a href="mutex.html">mutex.html</a>).</p>
+
+  <h2>Synopsis 摘要</h2>
+ <pre class="code">template &lt;typename T,<br> typename UserAllocator = default_user_allocator_new_delete,<br> typename Mutex = details::pool::default_mutex,<br> unsigned NextSize = 32&gt;<br>class pool_allocator<br>{<br> public:<br> ... // public interface<br><br> public: // extensions to public interface<br> typedef Mutex mutex;<br> static const unsigned next_size = NextSize;<br><br> template &lt;typename U&gt;<br> struct rebind<br> {<br> typedef pool_allocator&lt;U, UserAllocator, Mutex, NextSize&gt; other;<br> };<br>};<br><br>template &lt;typename T,<br> typename UserAllocator = default_user_allocator_new_delete,<br> typename Mutex = details::pool::default_mutex,<br> unsigned NextSize = 32&gt;<br>class fast_pool_allocator<br>{<br> public:<br> ... // public interface<br><br> public: // extensions to public interface<br> typedef Mutex mutex;<br> static const unsigned next_size = NextSize;<br><br> template &lt;typename U&gt;<br> struct rebind<br> {<br> typedef fast_pool_allocator&lt;U, UserAllocator, Mutex, NextSize&gt; other;<br> };<br>};<br></pre>

-  <h2>Extensions to Public Interface</h2>
+  <h2>Extensions to Public Interface 公有接口的扩展</h2>

-  <h3>Additional template parameters</h3>
+  <h3>Additional template parameters 额外的模板参数</h3>

   <h4 class="code">Mutex</h4>

<p>This parameter allows the user to determine the type of synchronization
   to be used on the underlying singleton pool. See the extensions to the
   public interface of <a href="singleton_pool.html">singleton pool</a> for
-  more information.</p>
+ more information.<br>该参数允许用户决定底层单件内存池所使用的同步类型。更 多信息请见 <a href="singleton_pool.html">singleton pool</a> 的"公有接口的扩 展"一节。</p>

   <h4 class="code">NextSize</h4>

<p>The value of this parameter is passed to the underlying Pool when it is
-  created. See the extensions to the public interface of <a href=
-  "pool.html">pool</a> for more information.</p>
+ created. See the extensions to the public interface of <a href="pool.html">pool</a> for more information.<br>该参数的值在底层内存池被 创建时将传递给它。更多信息请见 <a href="pool.html">pool</a> 的"公有接口的扩 展"。</p>

-  <h3>Modification of <span class="code">rebind</span></h3>
+ <h3>Modification of <span class="code">rebind 对 rebind 的修改 </span></h3>

   <p>The struct <span class="code">rebind</span> has been redefined to
-  preserve the values of the additional template parameters.</p>
+ preserve the values of the additional template parameters.<br>结构 <span class="code">rebind</span> 被重新定义,以保存以上额外模板参数的值。</p>

-  <h3>Additional members</h3>
+  <h3>Additional members 其它成员</h3>

   <p>The typedef <span class="code">mutex</span> and the static const value
   <span class="code">next_size</span> publish the values of the template
-  parameters <span class="code">Mutex</span> and <span class=
-  "code">NextSize</span>, respectively.</p>
+ parameters <span class="code">Mutex</span> and <span class="code">NextSize</span>, respectively.<br>typedef <span class="code">mutex</span> 和静态常量值 + <span class="code">next_size</span> 分别公开了模板参数 <span class="code">Mutex</span> 和 <span class="code">NextSize</span> 的值。</p>

-  <h2>Notes</h2>
+  <h2>Notes 说明</h2>

   <p>A number of common STL libraries contain bugs in their using of
-  allocators. Specifically, they pass null pointers to the <span class=
-  "code">deallocate</span> function, which is explicitly forbidden by the
+ allocators. Specifically, they pass null pointers to the <span class="code">deallocate</span> function, which is explicitly forbidden by the
   Standard [20.1.5 Table 32]. PoolAlloc will work around these libraries if
-  it detects them; currently, workarounds are in place for:</p>
+ it detects them; currently, workarounds are in place for:<br>一些公用 STL 库在对分配器的使用中含有bugs。具体而言,它们将空指针传递给 <span class="code">deallocate</span> 函数,这是被标准[20.1.5 Table 32]明令禁止的。 如果 PoolAlloc 检测到此种用法,将会使用变通的方法;目前已对以下库如此:</p>

   <ul>
     <li>Borland C++ (Builder and command-line compiler) with default
@@ -114,30 +66,25 @@
     <li>STLport (with any compiler), ver. 4.0 and earlier</li>
   </ul>

-  <h2>Future Directions</h2>
+  <h2>Future Directions 未来的方向</h2>

-  <p>When the Boost multithreading library is completed, the <span class=
-  "code">Mutex</span> parameter will be replaced by something from that
+ <p>When the Boost multithreading library is completed, the <span class="code">Mutex</span> parameter will be replaced by something from that library providing the same flexibility and will move from an implementation
-  detail into the interface specification.</p>
+ detail into the interface specification.<br>当 Boost 的多线程库完成时,参 数 <span class="code">Mutex</span> 将被来自于该库的某种类型所替代,以提供相 同的灵活性,并将其从实现细节部分移至接口描述部分。</p>

- <h2><a href="../interfaces/pool_alloc.html">Interface Description</a></h2> + <h2><a href="../interfaces/pool_alloc.html">Interface Description 接口描 述</a></h2>
   <hr>

- <p><a href="http://validator.w3.org/check?uri=referer";><img border="0" src= - "http://www.w3.org/Icons/valid-html401"; alt="Valid HTML 4.01 Transitional"
-  height="31" width="88"></a></p>
+ <p><a href="http://validator.w3.org/check?uri=referer";><img src="http://www.w3.org/Icons/valid-html401"; alt="Valid HTML 4.01 Transitional" border="0" height="31" width="88"></a></p>

   <p>Revised
<!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %B, %Y" startspan -->05 December, 2006<!--webbot bot="Timestamp" endspan i-checksum="38516" --></p>

- <p><i>Copyright &copy; 2000, 2001 Stephen Cleary (scleary AT jerviswebb DOT
+  <p><i>Copyright (c) 2000, 2001 Stephen Cleary (scleary AT jerviswebb DOT
   com)</i></p>

   <p><i>Distributed under the Boost Software License, Version 1.0. (See
accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a>
-  or copy at <a href=
-  
"http://www.boost.org/LICENSE_1_0.txt";>http://www.boost.org/LICENSE_1_0.txt</a>)</i></p>
-</body>
-</html>
+ or copy at <a href="http://www.boost.org/LICENSE_1_0.txt";>http://www.boost.org/LICENSE_1_0.txt</a>)</i></p>
+</body></html>
\ No newline at end of file

Modified: trunk/libs/pool/doc/implementation/pool_construct.html
==============================================================================
--- trunk/libs/pool/doc/implementation/pool_construct.html      (original)
+++ trunk/libs/pool/doc/implementation/pool_construct.html Wed May 27 01:51:16 2009
@@ -1,83 +1,75 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
-"http://www.w3.org/TR/html4/loose.dtd";>
-
-<html>
-<head>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd";>
+<html><head>
   <meta http-equiv="Content-Language" content="en-us">
-  <meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
+  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
   <link href="../pool.css" rel="stylesheet" type="text/css">

-  <title>Object Pool Constructors Generator</title>
-</head>
+  <title>Object Pool Constructors Generator</title></head>
+

 <body>
-  <img src="../../../../boost.png" width="276" height="86" alt="C++ Boost">
+  <img src="../../../../boost.png" alt="C++ Boost" height="86" width="276">

-  <h1 align="center">Object Pool Constructors Generator</h1>
+ <h1 align="center">Object Pool Constructors Generator 对象内存池构造函数 生成器</h1>

-  <h2>Description</h2>
+  <h2>Description 描述</h2>

-  <p>The template class <span class="code">object_pool</span> (see <a href=
-  "object_pool.html">object_pool.html</a>) contains a number of functions
+ <p>The template class <span class="code">object_pool</span> (see <a href="object_pool.html">object_pool.html</a>) contains a number of functions <span class="code">construct(..)</span>, which both allocate and construct
-  an object in a single operation.</p>
+ an object in a single operation.<br>模板类 <span class="code">object_pool</span> (请见 <a href="object_pool.html">object_pool.html</a>)含有多个函数结构<span class="code">(..)</span>,这些函数在单个操作中分配内存并构造一个对象。</p>

   <p>Since the number and type of arguments to this function is totally
   arbitrary, a simple system has been set up to automatically generate
   template <span class="code">construct</span> functions. This system is
   based on the macro preprocessor <strong>m4</strong>, which is standard on
-  UNIX systems and also available for Win32 systems.</p>
+ UNIX systems and also available for Win32 systems.<br>由于该函数的参数的 数量和类型完全是任意的,所以设置了一个简单的系统来自动生成模板构造函数。该系 统基于宏预处理器 <strong>m4</strong>,它是UNIX系统中的标准,也可用于Win32系 统。</p>

<p>detail/pool_construct.m4, when run with <strong>m4</strong>, will create
-  the file detail/pool_construct.inc, which only defines the <span class=
-  "code">construct</span> functions for the proper number of arguments. The
+ the file detail/pool_construct.inc, which only defines the <span class="code">construct</span> functions for the proper number of arguments. The
   number of arguments may be passed into the file as an m4 macro,
   <span class="code">NumberOfArguments</span>; if not provided, it will
-  default to <span class="code">3</span>.</p>
+ default to <span class="code">3</span>.<br>detail/pool_construct.m4, 用 <strong>m4</strong> 来运行时,将创建文件 detail/pool_construct.inc, 其中只定 义了正确参数数量的构造函数。参数数量可以作为一个m4宏 + <span class="code">NumberOfArguments</span> 传递给该文件;如果未提供,则 缺省为<span class="code">3</span>.</p>

   <p>For each different number of arguments (<span class="code">1</span> to
   <span class="code">NumberOfArguments</span>), a template function is
   generated. There are the same number of template parameters as there are
   arguments, and each argument's type is a reference to that (possibly
   cv-qualified) template argument. Each possible permutation of the
-  cv-qualifications is also generated.</p>
+ cv-qualifications is also generated.<br>对于每个不同的参数数量(<span class="code">1</span> 至 + <span class="code">NumberOfArguments</span>),生成一个模板函数。该模板函 数具有与参数数量相同的模板参数,每个参数的类型为对应的模板参数的引用(可能带 有cv-限定)。每种可能的cv-限定组合都会被生成。</p>

   <p>Because each permutation is generated for each possible number of
   arguments, the included file size grows exponentially in terms of the
   number of constructor arguments, not linearly. For the sake of rational
-  compile times, only use as many arguments as you need.</p>
+ compile times, only use as many arguments as you need.<br>因为每一个可能 的参数数量的组合都会被生成,所以包含文件的大小是按构造函数参数数量的对数增长 的,而不是线性增长的。为了合理的编译时间起见,请只使用需要的参数数量。</p>

<p>detail/pool_construct.bat and detail/pool_construct.sh are also provided
-  to call <strong>m4</strong>, defining <span class=
-  "code">NumberOfArguments</span> to be their command-line parameter. See
-  these files for more details.</p>
+ to call <strong>m4</strong>, defining <span class="code">NumberOfArguments</span> to be their command-line parameter. See + these files for more details.<br>detail/pool_construct.bat 和 detail/pool_construct.sh 也被提供,以调用 <strong>m4</strong>, 将 <span class="code">NumberOfArguments</span> 定义为其命令行参数。更多细节请见这些文 件。</p>

-  <h2>Dependencies</h2>
+  <h2>Dependencies 相关性</h2>

-  <p>Dependent on for.m4 (see <a href="for.html">for.html</a>).</p>
+ <p>Dependent on for.m4 (see <a href="for.html">for.html</a>).<br>依赖于 for.m4 (请见 <a href="for.html">for.html</a>).</p>

-  <h2>Future Directions</h2>
+  <h2>Future Directions 未来的方向</h2>

   <p>This system may be complemented by or replaced by a Python (or some
-  other language) script.</p>
+ other language) script.<br>这个系统可能会由一个Python(或其它语言)脚本来完 成或替代。</p>

- <h2><a href="../interfaces/object_pool.html">Interface Description</a></h2> + <h2><a href="../interfaces/object_pool.html">Interface Description 接口描 述</a></h2>
   <hr>

- <p><a href="http://validator.w3.org/check?uri=referer";><img border="0" src= - "http://www.w3.org/Icons/valid-html401"; alt="Valid HTML 4.01 Transitional"
-  height="31" width="88"></a></p>
+ <p><a href="http://validator.w3.org/check?uri=referer";><img src="http://www.w3.org/Icons/valid-html401"; alt="Valid HTML 4.01 Transitional" border="0" height="31" width="88"></a></p>

   <p>Revised
<!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %B, %Y" startspan -->05 December, 2006<!--webbot bot="Timestamp" endspan i-checksum="38516" --></p>

- <p><i>Copyright &copy; 2000, 2001 Stephen Cleary (scleary AT jerviswebb DOT
+  <p><i>Copyright (c) 2000, 2001 Stephen Cleary (scleary AT jerviswebb DOT
   com)</i></p>

   <p><i>Distributed under the Boost Software License, Version 1.0. (See
accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a>
-  or copy at <a href=
-  
"http://www.boost.org/LICENSE_1_0.txt";>http://www.boost.org/LICENSE_1_0.txt</a>)</i></p>
-</body>
-</html>
+ or copy at <a href="http://www.boost.org/LICENSE_1_0.txt";>http://www.boost.org/LICENSE_1_0.txt</a>)</i></p>
+</body></html>
\ No newline at end of file

Modified: trunk/libs/pool/doc/implementation/simple_segregated_storage.html
==============================================================================
--- trunk/libs/pool/doc/implementation/simple_segregated_storage.html (original) +++ trunk/libs/pool/doc/implementation/simple_segregated_storage.html Wed May 27 01:51:16 2009
@@ -1,96 +1,74 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
-"http://www.w3.org/TR/html4/loose.dtd";>
-
-<html>
-<head>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd";>
+<html><head>
   <meta http-equiv="Content-Language" content="en-us">
-  <meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
+  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
   <link href="../pool.css" rel="stylesheet" type="text/css">

-  <title>Simple Segregated Storage Implementation</title>
-</head>
+  <title>Simple Segregated Storage Implementation</title></head>
+

 <body>
-  <img src="../../../../boost.png" width="276" height="86" alt="C++ Boost">
+  <img src="../../../../boost.png" alt="C++ Boost" height="86" width="276">

-  <h1 align="center">Simple Segregated Storage Implementation</h1>
+ <h1 align="center">Simple Segregated Storage Implementation 简单分隔存储 的实现</h1>

-  <h2>Dependencies</h2>
+  <h2>Dependencies 相关性</h2>

   <p>Includes the system headers <span class="code">&lt;cstddef&gt;</span>
-  and <span class="code">&lt;functional&gt;</span>.</p>
+ and <span class="code">&lt;functional&gt;</span>.<br>包含系统头文件 <span class="code">&lt;cstddef&gt;</span> 和 <span class="code">&lt;functional&gt;</span>.</p>

-  <h2>Protected Interface</h2>
+  <h2>Protected Interface 保护接口</h2>

-  <h3>Synopsis</h3>
-  <pre class="code">
-template &lt;typename SizeType = std::size_t&gt;
-class simple_segregated_storage
-{
-  ... // Public interface
-
-  protected:
-    void * first;
-    static void * &amp; nextof(void * const ptr);
-    void * find_prev(void * ptr);
-};
-</pre>
+  <h3>Synopsis 摘要</h3>
+ <pre class="code">template &lt;typename SizeType = std::size_t&gt;<br>class simple_segregated_storage<br>{<br> ... // Public interface<br><br> protected:<br> void * first;<br> static void * &amp; nextof(void * const ptr);<br> void * find_prev(void * ptr);<br>};<br></pre>

   <h3 class="code">void * first;</h3>

   <p>This data member is the free list. It points to the first chunk in the
-  free list, or is equal to 0 if the free list is empty.</p>
+ free list, or is equal to 0 if the free list is empty.<br>该数据成员为空 闲列表。它指向空闲列表的第一个区块,或者如果空闲列表为空,则等于 0.</p>

   <h3 class="code">static void * &amp; nextof(void * const ptr);</h3>

<p>This is a convenience function. It helps clean up code dealing with the - free list by making it more readable. The return value is just <span class=
-  "code">*ptr</span> cast to the appropriate type. <span class=
-  "code">ptr</span> must not be 0.</p>
+ free list by making it more readable. The return value is just <span class="code">*ptr</span> cast to the appropriate type. <span class="code">ptr</span> must not be 0.<br>这是一个为方便使用的函数。它协助清 理处理空闲列表的代码,使之更易读。返回值只是转型为适当类型的 <span class="code">*ptr</span>. <span class="code">ptr</span> 必须不为 0.</p>

   <p>As an example, let us assume that we want to truncate the free list
-  after the first chunk. That is, we want to set <span class=
-  "code">*first</span> to 0; this will result in a free list with only one
-  entry. The normal way to do this is to first cast <span class=
- "code">first</span> to a pointer to a pointer to void, and then dereference + after the first chunk. That is, we want to set <span class="code">*first</span> to 0; this will result in a free list with only one + entry. The normal way to do this is to first cast <span class="code">first</span> to a pointer to a pointer to void, and then dereference
   and assign (<span class="code">*static_cast&lt;void **&gt;(first) =
   0;</span>). This can be done more easily through the use of this
-  convenience function (<span class="code">nextof(first) = 0;</span>).</p>
+ convenience function (<span class="code">nextof(first) = 0;</span>).<br>我们来看一个例子,假设我们想从第一个区块之后截断空闲列表。 即,我们想将 <span class="code">*first</span> 设为 0; 这将得到一个只有一个项 的空闲列表。通常的方法是,首先将 <span class="code">first</span> 转型为 void 的指针的指针,然后解引用并赋值 (<span class="code">*static_cast&lt;void **&gt;(first) = + 0;</span>)。但是使用这个便利函数就可以更容易完成任务(<span class="code">nextof(first) = 0;</span>).</p>

   <h3 class="code">void * find_prev(void * ptr);</h3>

<p>Traverses the free list referred to by <span class="code">first</span>,
   and returns the pointer previous to where <span class="code">ptr</span>
-  would go if it was in the free list. Returns 0 if <span class=
- "code">ptr</span> would go at the beginning of the free list (i.e., before
-  <span class="code">first</span>).</p>
+ would go if it was in the free list. Returns 0 if <span class="code">ptr</span> would go at the beginning of the free list (i.e., before + <span class="code">first</span>).<br>遍历由 <span class="code">first</span> 所引向的空闲列表,返回 <span class="code">ptr</span> + 所在位置之前的指针,如果它在空闲列表中。如果 <span class="code">ptr</span> 位于空闲列表的开始(即
+  <span class="code">first</span> 之前),则返回 0。</p>

   <p>Note that this function finds the location previous to where
   <span class="code">ptr</span> <strong>would</strong> go <strong>if it
was</strong> in the free list. It does <strong>not</strong> find the entry - in the free list before <span class="code">ptr</span> (unless <span class= - "code">ptr</span> is already in the free list). Specifically, <span class=
-  "code">find_prev(0)</span> will return 0, <strong>not</strong> the last
-  entry in the free list.</p>
+ in the free list before <span class="code">ptr</span> (unless <span class="code">ptr</span> is already in the free list). Specifically, <span class="code">find_prev(0)</span> will return 0, <strong>not</strong> the last + entry in the free list.<br>注意,该函数是查找在&nbsp;<span class="code">ptr</span> 之前的位置,如果它在空闲列表中。它并不是查找在空闲列 表中 <span class="code">ptr</span> 之前的项(除非 <span class="code">ptr</span> 已在空闲列表中)。特别是,<span class="code">find_prev(0)</span> 将返回 0,<strong>而不是</strong>空闲列表的 最后一项。</p>

   <h2><a href="../interfaces/simple_segregated_storage.html">Interface
-  Description</a></h2>
+  Description 接口描述</a></h2>
   <hr>

- <p><a href="http://validator.w3.org/check?uri=referer";><img border="0" src= - "http://www.w3.org/Icons/valid-html401"; alt="Valid HTML 4.01 Transitional"
-  height="31" width="88"></a></p>
+ <p><a href="http://validator.w3.org/check?uri=referer";><img src="http://www.w3.org/Icons/valid-html401"; alt="Valid HTML 4.01 Transitional" border="0" height="31" width="88"></a></p>

   <p>Revised
<!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %B, %Y" startspan -->05 December, 2006<!--webbot bot="Timestamp" endspan i-checksum="38516" --></p>

- <p><i>Copyright &copy; 2000, 2001 Stephen Cleary (scleary AT jerviswebb DOT
+  <p><i>Copyright (c) 2000, 2001 Stephen Cleary (scleary AT jerviswebb DOT
   com)</i></p>

   <p><i>Distributed under the Boost Software License, Version 1.0. (See
accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a>
-  or copy at <a href=
-  
"http://www.boost.org/LICENSE_1_0.txt";>http://www.boost.org/LICENSE_1_0.txt</a>)</i></p>
-</body>
-</html>
+ or copy at <a href="http://www.boost.org/LICENSE_1_0.txt";>http://www.boost.org/LICENSE_1_0.txt</a>)</i></p>
+</body></html>
\ No newline at end of file

Modified: trunk/libs/pool/doc/implementation/singleton.html
==============================================================================
--- trunk/libs/pool/doc/implementation/singleton.html   (original)
+++ trunk/libs/pool/doc/implementation/singleton.html Wed May 27 01:51:16 2009
@@ -1,55 +1,32 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
-"http://www.w3.org/TR/html4/loose.dtd";>
-
-<html>
-<head>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd";>
+<html><head>
   <meta http-equiv="Content-Language" content="en-us">
-  <meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
+  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
   <link href="../pool.css" rel="stylesheet" type="text/css">

-  <title>singleton - Singleton</title>
-</head>
-
+  <title>singleton - Singleton</title></head>
 <body>
-  <img src="../../../../boost.png" width="276" height="86" alt="C++ Boost">
+  <img src="../../../../boost.png" alt="C++ Boost" height="86" width="276">

-  <h1 align="center">singleton - Singleton</h1>
+  <h1 align="center">singleton - Singleton 单件</h1>

-  <h2>Introduction</h2>
+  <h2>Introduction 简介</h2>

   <p>detail/singleton.hpp provides a way to access a Singleton of a class
   type. This is <strong>not</strong> a general Singleton solution! It is
-  restricted in that the class type must have a default constructor.</p>
-
-  <h2>Synopsis</h2>
-  <pre class="code">
-namespace details {
-namespace pool {
-
-template &lt;typename T&gt;
-class singleton_default
-{
-  private:
-    singleton_default();
+ restricted in that the class type must have a default constructor.<br>detail/singleton.hpp 提供了一个访问某个类类型的 Singleton 的 方法。它<strong>不是</strong>一个通用的 Singleton 方案!它被限于该类类型必须 有一个缺省构造函数。</p>

-  public:
-    typedef T object_type;
+  <h2>Synopsis 摘要</h2>
+ <pre class="code">namespace details {<br>namespace pool {<br><br>template &lt;typename T&gt;<br>class singleton_default<br>{<br> private:<br> singleton_default();<br><br> public:<br> typedef T object_type;<br><br> static object_type &amp; instance();<br>};<br><br>} // namespace pool<br>} // namespace details<br></pre>

-    static object_type &amp; instance();
-};
+  <h2>Semantics 语义</h2>

-} // namespace pool
-} // namespace details
-</pre>
-
-  <h2>Semantics</h2>
-
-  <table border align="center" summary="">
+  <table summary="" align="center" border="1">
     <caption>
       <em>Symbol Table</em>
     </caption>

-    <tr>
+    <tbody><tr>
       <th>Symbol</th>

       <th>Meaning</th>
@@ -59,17 +36,16 @@
       <td class="code">T</td>

<td>Any class with a non-throwing default constructor and non-throwing
-      destructor</td>
+      destructor<br>任何带有无抛出缺省构造函数和无抛出析构函数的类</td>
     </tr>
-  </table><br>
+  </tbody></table><br>

-  <table border align="center" summary="">
+  <table summary="" align="center" border="1">
     <caption>
-      <em>Requirements satisfied by <span class=
-      "code">singleton_default&lt;T&gt;</span></em>
+ <em>Requirements satisfied by <span class="code">singleton_default&lt;T&gt;</span></em>
     </caption>

-    <tr>
+    <tbody><tr>
       <th>Expression</th>

       <th>Return Type</th>
@@ -82,50 +58,44 @@

       <td class="code">T &amp;</td>

-      <td>Returns a reference to the singleton instance</td>
+ <td>Returns a reference to the singleton instance<br>返回一个引向单件 实例的引用</td>
     </tr>
-  </table>
+  </tbody></table>

-  <h2>Guarantees</h2>
+  <h2>Guarantees 保证</h2>

   <p>The singleton instance is guaranteed to be constructed before
- <span class="code">main()</span> begins, and destructed after <span class= - "code">main()</span> ends. Furthermore, it is guaranteed to be constructed
-  before the first call to <span class=
-  "code">singleton_default&lt;T&gt;::instance()</span> is complete (even if
+ <span class="code">main()</span> begins, and destructed after <span class="code">main()</span> ends. Furthermore, it is guaranteed to be constructed + before the first call to <span class="code">singleton_default&lt;T&gt;::instance()</span> is complete (even if called before <span class="code">main()</span> begins). Thus, if there are
-  not multiple threads running except within <span class=
-  "code">main()</span>, and if all access to the singleton is restricted by
-  mutexes, then this guarantee allows a thread-safe singleton.</p>
+ not multiple threads running except within <span class="code">main()</span>, and if all access to the singleton is restricted by + mutexes, then this guarantee allows a thread-safe singleton.<br>该单件实 例保证在 + <span class="code">main()</span> 开始之前完成构造,并在 <span class="code">main()</span> 结束之后析构。此外,它还保证在首次调用 <span class="code">singleton_default&lt;T&gt;::instance()</span> 之前完成构造(即使 是在 <span class="code">main()</span> 开始之前调用)。因此,如果除了在 <span class="code">main()</span> 内部以外没有多线程运行,而且如果所有对该单件的访 问都受限于互斥体,则可以保证这是一个线程安全的单件。</p>

-  <h2>Details</h2>
+  <h2>Details 细节</h2>

<p>For details on how we provide the guarantees above, see the comments in
-  the header file.</p>
+ the header file.<br>对于我们如何提供以上保证的有关细节,请参考该头文件中 的注释。</p>

-  <h2>Dependencies</h2>
+  <h2>Dependencies 相关性</h2>

-  <p>None.</p>
+  <p>None.<br>无。</p>

-  <h2>Future Directions</h2>
+  <h2>Future Directions 未来的方向</h2>

-  <p>This header may be replaced by a Boost singleton library.</p>
+ <p>This header may be replaced by a Boost singleton library.<br>该头文件 可能会被一个 Boost 单件库所替代。</p>
   <hr>

- <p><a href="http://validator.w3.org/check?uri=referer";><img border="0" src= - "http://www.w3.org/Icons/valid-html401"; alt="Valid HTML 4.01 Transitional"
-  height="31" width="88"></a></p>
+ <p><a href="http://validator.w3.org/check?uri=referer";><img src="http://www.w3.org/Icons/valid-html401"; alt="Valid HTML 4.01 Transitional" border="0" height="31" width="88"></a></p>

   <p>Revised
<!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %B, %Y" startspan -->05 December, 2006<!--webbot bot="Timestamp" endspan i-checksum="38516" --></p>

- <p><i>Copyright &copy; 2000, 2001 Stephen Cleary (scleary AT jerviswebb DOT
+  <p><i>Copyright (c) 2000, 2001 Stephen Cleary (scleary AT jerviswebb DOT
   com)</i></p>

   <p><i>Distributed under the Boost Software License, Version 1.0. (See
accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a>
-  or copy at <a href=
-  
"http://www.boost.org/LICENSE_1_0.txt";>http://www.boost.org/LICENSE_1_0.txt</a>)</i></p>
-</body>
-</html>
+ or copy at <a href="http://www.boost.org/LICENSE_1_0.txt";>http://www.boost.org/LICENSE_1_0.txt</a>)</i></p>
+</body></html>
\ No newline at end of file

Modified: trunk/libs/pool/doc/implementation/singleton_pool.html
==============================================================================
--- trunk/libs/pool/doc/implementation/singleton_pool.html      (original)
+++ trunk/libs/pool/doc/implementation/singleton_pool.html Wed May 27 01:51:16 2009
@@ -1,50 +1,30 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
-"http://www.w3.org/TR/html4/loose.dtd";>
-
-<html>
-<head>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd";>
+<html><head>
   <meta http-equiv="Content-Language" content="en-us">
-  <meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
+  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
   <link href="../pool.css" rel="stylesheet" type="text/css">

-  <title>Singleton Pool Implementation</title>
-</head>
+  <title>Singleton Pool Implementation</title></head>
+

 <body>
-  <img src="../../../../boost.png" width="276" height="86" alt="C++ Boost">
+  <img src="../../../../boost.png" alt="C++ Boost" height="86" width="276">

-  <h1 align="center">Singleton Pool Implementation</h1>
+  <h1 align="center">Singleton Pool Implementation 单件内存池实现</h1>

-  <h2>Dependencies</h2>
+  <h2>Dependencies 相关性</h2>

   <p>Includes the Boost headers <span class="code">"pool.hpp"</span> (see
-  <a href="pool.html">pool.html</a>), <span class=
-  "code">"detail/singleton.hpp"</span> (see <a href=
-  "singleton.html">singleton.html</a>), <span class=
- "code">"detail/mutex.hpp"</span> (see <a href="mutex.html">mutex.html</a>),
-  and <span class="code">"detail/guard.hpp"</span> (see <a href=
-  "guard.html">guard.html</a>).</p>
-
-  <h2>Synopsis</h2>
-  <pre class="code">
-template &lt;typename Tag,
-    unsigned RequestedSize,
-    typename UserAllocator = default_user_allocator_new_delete,
-    typename Mutex = details::pool::default_mutex,
-    unsigned NextSize = 32&gt;
-class singleton_pool
-{
-  ... // public interface
-
-  public: // extensions to public interface
-    typedef Mutex mutex;
-    static const unsigned next_size = NextSize;
-};
-</pre>
+ <a href="pool.html">pool.html</a>), <span class="code">"detail/singleton.hpp"</span> (see <a href="singleton.html">singleton.html</a>), <span class="code">"detail/mutex.hpp"</span> (see <a href="mutex.html">mutex.html</a>), + and <span class="code">"detail/guard.hpp"</span> (see <a href="guard.html">guard.html</a>).<br>包含了 Boost 头文件 <span class="code">"pool.hpp"</span> (请见 + <a href="pool.html">pool.html</a>), <span class="code">"detail/singleton.hpp"</span> (请见 <a href="singleton.html">singleton.html</a>), <span class="code">"detail/mutex.hpp"</span> (请见 <a href="mutex.html">mutex.html</a>), 和 <span class="code">"detail/guard.hpp"</span> (请见 <a href="guard.html">guard.html</a>).</p>
+
+  <h2>Synopsis 摘要</h2>
+ <pre class="code">template &lt;typename Tag,<br> unsigned RequestedSize,<br> typename UserAllocator = default_user_allocator_new_delete,<br> typename Mutex = details::pool::default_mutex,<br> unsigned NextSize = 32&gt;<br>class singleton_pool<br>{<br> ... // public interface<br><br> public: // extensions to public interface<br> typedef Mutex mutex;<br> static const unsigned next_size = NextSize;<br>};<br></pre>

-  <h2>Extensions to Public Interface</h2>
+  <h2>Extensions to Public Interface 公有接口的扩展</h2>

-  <h3>Additional template parameters</h3>
+  <h3>Additional template parameters 额外的模板参数</h3>

   <h4 class="code">Mutex</h4>

@@ -53,46 +33,40 @@
   users may declare some singleton pools normally (i.e., with
   synchronization), but some singleton pools without synchronization (by
   specifying <span class="code">details::pool::null_mutex</span>) for
-  efficiency reasons.</p>
+ efficiency reasons.<br>该类为 <a href="mutex.html">mutex</a> 的类型,用于 保护对底层内存池的并发访问。它是公开的,所以用户可以如常声明一些单件内存池 (即带同步的),不过由于效率的原因,有些单件内存池是不带同步的(通过指定 <span class="code">details::pool::null_mutex</span>)。</p>

   <h4 class="code">NextSize</h4>

<p>The value of this parameter is passed to the underlying Pool when it is
-  created. See the extensions to the public interface of <a href=
-  "pool.html">pool</a> for more information.</p>
+ created. See the extensions to the public interface of <a href="pool.html">pool</a> for more information.<br>该参数的值在底层内存池被 创建时将传递给它。更多信息请见 <a href="pool.html">pool</a> 的"公有接口的扩 展"。</p>

-  <h3>Additional members</h3>
+  <h3>Additional members 其它成员</h3>

   <p>The typedef <span class="code">mutex</span> and the static const value
   <span class="code">next_size</span> publish the values of the template
-  parameters <span class="code">Mutex</span> and <span class=
-  "code">NextSize</span>, respectively.</p>
+ parameters <span class="code">Mutex</span> and <span class="code">NextSize</span>, respectively.<br>typedef <span class="code">mutex</span> 和静态常量值 + <span class="code">next_size</span> 分别公开了模板参数 <span class="code">Mutex</span> 和 <span class="code">NextSize</span> 的值。</p>

-  <h2>Future Directions</h2>
+  <h2>Future Directions 未来的方向</h2>

-  <p>When the Boost multithreading library is completed, the <span class=
-  "code">Mutex</span> parameter will be replaced by something from that
+ <p>When the Boost multithreading library is completed, the <span class="code">Mutex</span> parameter will be replaced by something from that library providing the same flexibility and will move from an implementation
-  detail into the interface specification.</p>
+ detail into the interface specification.<br>当 Boost 的多线程库完成时,参 数 <span class="code">Mutex</span> 将被来自于该库的某种类型所替代,以提供相 同的灵活性,并将其从实现细节部分移至接口描述部分。</p>

   <h2><a href="../interfaces/singleton_pool.html">Interface
-  Description</a></h2>
+  Description 接口描述</a></h2>
   <hr>

- <p><a href="http://validator.w3.org/check?uri=referer";><img border="0" src= - "http://www.w3.org/Icons/valid-html401"; alt="Valid HTML 4.01 Transitional"
-  height="31" width="88"></a></p>
+ <p><a href="http://validator.w3.org/check?uri=referer";><img src="http://www.w3.org/Icons/valid-html401"; alt="Valid HTML 4.01 Transitional" border="0" height="31" width="88"></a></p>

   <p>Revised
<!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %B, %Y" startspan -->05 December, 2006<!--webbot bot="Timestamp" endspan i-checksum="38516" --></p>

- <p><i>Copyright &copy; 2000, 2001 Stephen Cleary (scleary AT jerviswebb DOT
+  <p><i>Copyright (c) 2000, 2001 Stephen Cleary (scleary AT jerviswebb DOT
   com)</i></p>

   <p><i>Distributed under the Boost Software License, Version 1.0. (See
accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a>
-  or copy at <a href=
-  
"http://www.boost.org/LICENSE_1_0.txt";>http://www.boost.org/LICENSE_1_0.txt</a>)</i></p>
-</body>
-</html>
+ or copy at <a href="http://www.boost.org/LICENSE_1_0.txt";>http://www.boost.org/LICENSE_1_0.txt</a>)</i></p>
+</body></html>
\ No newline at end of file

Modified: trunk/libs/pool/doc/index.html
==============================================================================
--- trunk/libs/pool/doc/index.html      (original)
+++ trunk/libs/pool/doc/index.html      Wed May 27 01:51:16 2009
@@ -1,231 +1,221 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
-"http://www.w3.org/TR/html4/loose.dtd";>
-
-<html>
-<head>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd";>
+<html><head>
   <meta http-equiv="Content-Language" content="en-us">
-  <meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
+  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
   <link href="pool.css" rel="stylesheet" type="text/css">

-  <title>Boost Pool Library</title>
-</head>
+  <title>Boost Pool Library</title></head>
+

 <body>
-  <img src="../../../boost.png" width="276" height="86" alt="C++ Boost">
+  <img src="../../../boost.png" alt="C++ Boost" height="86" width="276">

   <h1 align="center">Boost Pool Library</h1>

-  <h2>Introduction</h2>
+  <h2>Introduction 简介</h2>

-  <h3>What is Pool?</h3>
+  <h3>What is Pool? 内存池是什么?</h3>

   <p>Pool allocation is a memory allocation scheme that is very fast, but
limited in its usage. For more information on pool allocation (also called - &quot;simple segregated storage&quot;), see <a href="concepts.html">the concepts
-  document</a>.</p>
+  "simple segregated storage"), see <a href="concepts.html">the concepts
+ document</a>.<br>内存池分配是一种非常快速但用途有限的内存分配机制。有关内 存池分配(又称"简单的分隔式存储")的更多信息,请见 <a href="concepts.html">"概 念"文档</a>。</p>

-  <h3>Why should I use Pool?</h3>
+  <h3>Why should I use Pool? 为什么要使用内存池?</h3>

   <p>Using Pools gives you more control over how memory is used in your
program. For example, you could have a situation where you want to allocate
   a bunch of small objects at one point, and then reach a point in your
program where none of them are needed any more. Using pool interfaces, you can choose to run their destructors or just drop them off into oblivion; the
-  pool interface will guarantee that there are no system memory leaks.</p>
+ pool interface will guarantee that there are no system memory leaks.<br>使 +用内存池可以让你更好地控制在程序中如何使用内存。例如,你可能在某种情形下想 要在一个执行点分配一群小型对象,然后在到达程序的另一个执行点时则不再需 +要这些小型对象。使用内存池接口,你可以选择运行它们的析构函数,或者只是丢弃 它们;内存池接口可以保证没有系统内存泄漏。</p>

-  <h3>When should I use Pool?</h3>
+  <h3>When should I use Pool? 什么时候应该使用内存池?</h3>

   <p>Pools are generally used when there is a lot of allocation and
deallocation of small objects. Another common usage is the situation above,
-  where many objects may be dropped out of memory.</p>
-
-  <p>In general, use Pools when you need a more efficient way to do unusual
-  memory control.</p>
+ where many objects may be dropped out of memory.<br>如果有大量小型对象的 分配和释放,通常就会使用内存池。另一种常见的用途就是上面的情形,即有许多对象 要被丢弃。</p><p>In general, use Pools when you need a more efficient way to do unusual + memory control.<br>通常来说,当你需要一个更高效的方法来进行非常规的内存控 制时,使用内存池。</p>

-  <h3>How do I use Pool?</h3>
+  <h3>How do I use Pool? 如何使用内存池?</h3>

   <p>See the <a href="interfaces.html">pool interfaces document</a>, which
-  covers the different Pool interfaces supplied by this library.</p>
+ covers the different Pool interfaces supplied by this library.<br>参见 <a href="interfaces.html">pool 接口文档</a>,它涵盖了本库所提供各个不同的内 存池接口。</p>

-  <h2>Library Structure and Dependencies</h2>
+  <h2>Library Structure and Dependencies 库结构和依赖关系</h2>

<p>Forward declarations of all the exposed symbols for this library are in
-  the header <span class="code">&lt;boost/pool/poolfwd.hpp&gt;</span>.</p>
+ the header <span class="code">&lt;boost/pool/poolfwd.hpp&gt;</span>.<br>本库对外公开的所有符 号的前向声明,位于头文件 <span class="code">&lt;boost/pool/poolfwd.hpp&gt;</span>。</p>

-  <p>The library may use macros, which will be prefixed with <span class=
- "code">BOOST_POOL_</span>. The exception to this rule are the include file
-  guards, which (for file <em>xxx</em>.hpp) is <span class=
-  "code">BOOST_<em>xxx</em>_HPP</span>.</p>
+ <p>The library may use macros, which will be prefixed with <span class="code">BOOST_POOL_</span>. The exception to this rule are the include file + guards, which (for file <em>xxx</em>.hpp) is <span class="code">BOOST_<em>xxx</em>_HPP</span>.<br>本库所使用的宏均以 <span class="code">BOOST_POOL_</span> 开头。这一规则的唯一例外是头文件的重入防 卫,文件 <em>xxx</em>.hpp 的重入防卫为 <span class="code">BOOST_<em>xxx</em>_HPP</span>。</p>

   <p>All exposed symbols defined by the library will be in namespace
<span class="code">boost</span>. All symbols used only by the implementation
-  will be in namespace <span class=
-  "code">boost::details::pool</span>.</p>
+ will be in namespace <span class="code">boost::details::pool</span>.<br>本库所定义的所有公开符号均位于 + <span class="code">boost</span> 名字空间。而只用于实现的符号则位于 <span class="code">boost::details::pool</span> 名字空间。</p>

   <p>Every header used only by the implementation is in the subdirectory
-  <span class="code">detail/</span>.</p>
+ <span class="code">detail/</span>.<br>只用于实现的头文件位于子目录 <span class="code">detail/</span>。</p>

<p>Any header in the library may include any other header in the library or
-  any system-supplied header at its discretion.</p>
+ any system-supplied header at its discretion.<br>本库中的任一头文件都可能 包含库内的另一个头文件,或者系统提供的任意头文件,视其需要而定。</p>

-  <h2>Installation</h2>
+  <h2>Installation 安装</h2>

<p>The Boost Pool library is a header file library. That means there is no .lib, .dll, or .so to build; just add the Boost directory to your compiler's
-  include file path, and you should be good to go!</p>
+ include file path, and you should be good to go!<br>Boost Pool 库是一个头 文件库。即没有 + .lib, .dll, 或 .so 文件要构建;只需要把 Boost 目录加到你的编译器头文件包 含路径中,你就可以用了!</p>

-  <h2>Building the Test Programs</h2>
+  <h2>Building the Test Programs 构建测试程序</h2>

- <p>The subdirectory &quot;build&quot; contains subdirectories for several different
+  <p>The subdirectory "build" contains subdirectories for several different
platforms. These subdirectories contain all necessary work-around code for - that platform, as well as makefiles or IDE project files as appropriate.</p> + that platform, as well as makefiles or IDE project files as appropriate.<br>子目录 "build" 中包含多个不同平台的子目录。这些子目录中含有 相应平台所需的变通代码,以及适当的 makefiles 或 IDE 项目。</p>

- <p>Read the &quot;readme.txt&quot; in the proper subdirectory, if it exists.</p> + <p>Read the "readme.txt" in the proper subdirectory, if it exists.<br>请 阅读相应子目录中的 "readme.txt",如果该文件存在的话。</p>

- <p>The standard makefile targets are &quot;all&quot;, &quot;clean&quot; (which deletes any - intermediate files), and &quot;veryclean&quot; (which deletes any intermediate files
+  <p>The standard makefile targets are "all", "clean" (which deletes any
+ intermediate files), and "veryclean" (which deletes any intermediate files
   and executables). All intermediate and executable files are built in the
   same directory as the makefile/project file. If there is a project file
- supplied instead of a makefile, &quot;clean&quot; and &quot;veryclean&quot; shell scripts/batch
-  files will be provided.</p>
+ supplied instead of a makefile, "clean" and "veryclean" shell scripts/batch
+  files will be provided.<br>标
+准的 makefile 目标是 "all", "clean" (删除所有中间文件),和 "veryclean"
+(删除所有中间文件和可执行文件)。所有中间文件和可执行文件在 makefile/project
+文件所在的目录中构建。如果提供的是项目文件而不是 makefile,则会提 供 "clean"和 "veryclean" shell
+脚本或批处理文件。</p>

   <p>Project files and makefiles for additional platforms may be sent to
-  Stephen Cleary at scleary AT jerviswebb DOT com.</p>
+ Stephen Cleary at scleary AT jerviswebb DOT com.<br>如果你有其它平台所用 的项目文件和 makefiles,可以发送至 Stephen Cleary at scleary AT jerviswebb DOT com.</p>

-  <h2>Documentation Map</h2>
+  <h2>Documentation Map 文档地图</h2>

   <ul>
-    <li>Overview of Pooling
+    <li>Overview of Pooling <br>内存池简介

       <ul>
<li><a href="concepts.html">concepts.html</a> - The basic ideas behind
-        pooling.</li>
+ pooling.<br><a href="concepts.html">concepts.html</a> - 内存池背后 的基本意思。</li>

-        <li><a href=
-        "implementation/alignment.html">implementation/alignment.html</a> -
-        How we guarantee alignment portably.</li>
+ <li><a href="implementation/alignment.html">implementation/alignment.html</a> - + How we guarantee alignment portably.<br><a href="implementation/alignment.html">implementation/alignment.html</a> -
+        我们如何保证字节对齐的可移植性。</li>

         <li><a href="interfaces.html">interfaces.html</a> - What interfaces
-        are provided and when to use each one.</li>
+ are provided and when to use each one.<br><a href="interfaces.html">interfaces.html</a> - 提供哪些接口,以及何时使用哪一 种。</li>
       </ul>
     </li>

-    <li>Pool Exposed Interfaces
+    <li>Pool Exposed Interfaces<br>公开的内存池接口

       <ul>
-        <li><a href=
-        "interfaces/simple_segregated_storage.html">
+        <li><a href="interfaces/simple_segregated_storage.html">
         interfaces/simple_segregated_storage.html</a>
-        - Not for the faint of heart; embedded programmers only.</li>
+ - Not for the faint of heart; embedded programmers only.<br><a href="interfaces/simple_segregated_storage.html">
+        interfaces/simple_segregated_storage.html</a>
+        - 不适用于脆弱的心脏;只适用于嵌入式程序员。</li>

         <li><a href="interfaces/pool.html">interfaces/pool.html</a> - The
-        basic pool interface.</li>
+ basic pool interface.<br><a href="interfaces/pool.html">interfaces/pool.html</a> - 内存池的基本接口。 </li>
+
+ <li><a href="interfaces/singleton_pool.html">interfaces/singleton_pool.html</a> - + The basic pool interface as a thread-safe singleton.<br><a href="interfaces/singleton_pool.html">interfaces/singleton_pool.html</a> - 作为线程安全的单件的基本内存池接口。</li>

-        <li><a href=
- "interfaces/singleton_pool.html">interfaces/singleton_pool.html</a> -
-        The basic pool interface as a thread-safe singleton.</li>
-
-        <li><a href=
-        "interfaces/object_pool.html">interfaces/object_pool.html</a> - A
-        type-oriented (instead of size-oriented) pool interface.</li>
-
-        <li><a href=
-        "interfaces/pool_alloc.html">interfaces/pool_alloc.html</a> - A
-        Standard Allocator pool interface based on singleton_pool.</li>
+ <li><a href="interfaces/object_pool.html">interfaces/object_pool.html</a> - A + type-oriented (instead of size-oriented) pool interface.<br><a href="interfaces/object_pool.html">interfaces/object_pool.html</a> - 面向类 型(而不是面向大小)的内存池接口。</li>

-        <li><a href=
- "interfaces/user_allocator.html">interfaces/user_allocator.html</a> - + <li><a href="interfaces/pool_alloc.html">interfaces/pool_alloc.html</a> - A + Standard Allocator pool interface based on singleton_pool.<br><a href="interfaces/pool_alloc.html">interfaces/pool_alloc.html</a> - 基于 singleton_pool 的标准分配器内存池接口。</li>
+
+ <li><a href="interfaces/user_allocator.html">interfaces/user_allocator.html</a> -
         OK, not a pool interface, but it describes how the user can control
-        how Pools allocate system memory.</li>
+ how Pools allocate system memory.<br><a href="interfaces/user_allocator.html">interfaces/user_allocator.html</a> - + OK, 不是一个内存池接口,不过它说明了用户如何控制内存池分配系统内存 的方法。</li>
       </ul>
     </li>

-    <li>Pool Implementation Details and Extensions
+    <li>Pool Implementation Details and Extensions<br>内存池实现细节和扩展

       <ul>
-        <li>Interface Implementations and Extensions
+        <li>Interface Implementations and Extensions<br>接口实现和扩展

           <ul>
-            <li><a href=
-            "implementation/simple_segregated_storage.html">
+            <li><a href="implementation/simple_segregated_storage.html">
             implementation/simple_segregated_storage.html</a></li>

-            <li><a href=
-            "implementation/pool.html">implementation/pool.html</a></li>
+ <li><a href="implementation/pool.html">implementation/pool.html</a></li>

-            <li><a href=
-            "implementation/singleton_pool.html">
+            <li><a href="implementation/singleton_pool.html">
             implementation/singleton_pool.html</a></li>

-            <li><a href=
-            
"implementation/object_pool.html">implementation/object_pool.html</a></li>
+ <li><a href="implementation/object_pool.html">implementation/object_pool.html</a></li>

-            <li><a href=
-            
"implementation/pool_alloc.html">implementation/pool_alloc.html</a></li>
+ <li><a href="implementation/pool_alloc.html">implementation/pool_alloc.html</a></li>
           </ul>
         </li>

-        <li>Components Used Only by the Implementation
+ <li>Components Used Only by the Implementation<br>仅由实现使用的组

           <ul>
-            <li><a href=
-            "implementation/ct_gcd_lcm.html">implementation/ct_gcd_lcm.html</a>
-            - Compile-time GCD and LCM.</li>
+ <li><a href="implementation/ct_gcd_lcm.html">implementation/ct_gcd_lcm.html</a> + - Compile-time GCD and LCM.<br><a href="implementation/ct_gcd_lcm.html">implementation/ct_gcd_lcm.html</a>
+            - 编译期 GCD 和 LCM.</li>

<li><a href="implementation/for.html">implementation/for.html</a>
-            - Description of an m4 component.</li>
+ - Description of an m4 component.<br><a href="implementation/for.html">implementation/for.html</a>
+            - 一个 m4 组件的描述。</li>
+
+ <li><a href="implementation/gcd_lcm.html">implementation/gcd_lcm.html</a> - + Run-time GCD and LCM.<br><a href="implementation/gcd_lcm.html">implementation/gcd_lcm.html</a> -
+            运行期 GCD 和 LCM.</li>

-            <li><a href=
-            "implementation/gcd_lcm.html">implementation/gcd_lcm.html</a> -
-            Run-time GCD and LCM.</li>
-
-            <li><a href=
- "implementation/guard.html">implementation/guard.html</a> - Auto
-            lock/unlock for mutex.</li>
-
-            <li><a href=
-            "implementation/mutex.html">implementation/mutex.html</a> -
-            Platform-dependent mutex type.</li>
+ <li><a href="implementation/guard.html">implementation/guard.html</a> - Auto + lock/unlock for mutex.<br><a href="implementation/guard.html">implementation/guard.html</a> - 用于互斥体 的自动锁定/解锁。</li>

-            <li><a href=
-            "implementation/pool_construct.html">
+ <li><a href="implementation/mutex.html">implementation/mutex.html</a> - + Platform-dependent mutex type.<br><a href="implementation/mutex.html">implementation/mutex.html</a> -
+            平台相关的互斥体类型。</li>
+
+            <li><a href="implementation/pool_construct.html">
             implementation/pool_construct.html</a>
             - The system for supporting more constructor arguments in
-            object_pool.</li>
+            object_pool.<br><a href="implementation/pool_construct.html">
+            implementation/pool_construct.html</a>
+            - 在 object_pool 的构造函数中使用更多参数的支持系统。</li>

-            <li><a href=
-            "implementation/singleton.html">implementation/singleton.html</a>
-            - Singleton that avoids static initialization problem.</li>
+ <li><a href="implementation/singleton.html">implementation/singleton.html</a> + - Singleton that avoids static initialization problem.<br><a href="implementation/singleton.html">implementation/singleton.html</a>
+            - 避免静态初始化问题的单件。</li>
           </ul>
         </li>
       </ul>
     </li>
   </ul>

-  <h2>Future Directions</h2>
+  <h2>Future Directions 未来的方向</h2>

<p>Another pool interface will be written: a base class for per-class pool
-  allocation.</p>
+ allocation.<br>将编写另一个内存池接口:针对每个类进行内存池分配的基类。 </p>

-  <h2>Acknowledgements</h2>
+  <h2>Acknowledgements 鸣谢</h2>

<p>Many, many thanks to the Boost peers, notably Jeff Garland, Beman Dawes,
   Ed Brey, Gary Powell, Peter Dimov, and Jens Maurer for providing helpful
   suggestions!</p>
   <hr>

- <p><a href="http://validator.w3.org/check?uri=referer";><img border="0" src= - "http://www.w3.org/Icons/valid-html401"; alt="Valid HTML 4.01 Transitional"
-  height="31" width="88"></a></p>
+ <p><a href="http://validator.w3.org/check?uri=referer";><img style="border: 0px solid ; width: 88px; height: 31px;" src="../../../valid-html401.png" alt="Valid HTML 4.01 Transitional"></a></p>

   <p>Revised
<!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %B, %Y" startspan -->05 December, 2006<!--webbot bot="Timestamp" endspan i-checksum="38516" --></p>

- <p><i>Copyright &copy; 2000, 2001 Stephen Cleary (scleary AT jerviswebb DOT com)</i></p> + <p><i>Copyright (c) 2000, 2001 Stephen Cleary (scleary AT jerviswebb DOT com)</i></p>

   <p><i>Distributed under the Boost Software License, Version 1.0. (See
accompanying file <a href="../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a> or
-  copy at <a href=
-  
"http://www.boost.org/LICENSE_1_0.txt";>http://www.boost.org/LICENSE_1_0.txt</a>)</i></p>
-</body>
-</html>
+ copy at <a href="http://www.boost.org/LICENSE_1_0.txt";>http://www.boost.org/LICENSE_1_0.txt</a>)</i></p>
+</body></html>
\ No newline at end of file

Modified: trunk/libs/pool/doc/interfaces.html
==============================================================================
--- trunk/libs/pool/doc/interfaces.html (original)
+++ trunk/libs/pool/doc/interfaces.html Wed May 27 01:51:16 2009
@@ -1,67 +1,51 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
-"http://www.w3.org/TR/html4/loose.dtd";>
-
-<html>
-<head>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd";>
+<html><head>
   <meta http-equiv="Content-Language" content="en-us">
-  <meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
+  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
   <link href="pool.css" rel="stylesheet" type="text/css">

-  <title>Boost Pool Interfaces</title>
-</head>
-
+  <title>Boost Pool Interfaces</title></head>
 <body>
-  <img src="../../../boost.png" width="276" height="86" alt="C++ Boost">
+  <img src="../../../boost.png" alt="C++ Boost" height="86" width="276">

   <h1 align="center">Boost Pool Interfaces</h1>

-  <h2>Introduction</h2>
+  <h2>Introduction 简介</h2>

<p>There are several interfaces provided which allow users great flexibility
-  in how they want to use Pools. Review the <a href=
- "concepts.html">concepts document</a> to get the basic understanding of how
-  Pools work.</p>
+ in how they want to use Pools. Review the <a href="concepts.html">concepts document</a> to get the basic understanding of how + Pools work.<br>我们提供了几个接口,让用户可以非常灵活地使用 Pools. 请回顾 一下 <a href="concepts.html">概念文档</a> 以获得 Pools 如何工作的基本知识。 </p>

-  <h2>Terminology and Tradeoffs</h2>
+  <h2>Terminology and Tradeoffs 术语和权衡</h2>

-  <h3>Object Usage vs. Singleton Usage</h3>
+  <h3>Object Usage vs. Singleton Usage 对象用法 与 单件用法</h3>

<p><em>Object Usage</em> is the method where each Pool is an object that may be created and destroyed. Destroying a Pool implicitly frees all chunks that
-  have been allocated from it.</p>
+ have been allocated from it.<br><em>对象用法</em> 即每个 Pool 是一个对 象,可能需要创建和销毁。销毁一个 Pool&nbsp;会隐式释放分配给它的所有内存区 块。</p>

<p><em>Singleton Usage</em> is the method where each Pool is an object with static duration; that is, it will not be destroyed until program exit. Pool
   objects with Singleton Usage may be shared; thus, Singleton Usage implies
   thread-safety as well. System memory allocated by Pool objects with
-  Singleton Usage may be freed through <span class=
- "code">release_memory</span> or <span class="code">purge_memory</span>.</p> + Singleton Usage may be freed through <span class="code">release_memory</span> or <span class="code">purge_memory</span>.<br><em>单件用法</em> 即每个 Pool 是一个静 态持续的对象;即它在程序退出前不会被销毁。单件用法的 Pool + 对象是可共享的;因此,单件用法也是线程安全的。单件用法的 Pool 对象所分配 的系统内存可通过 <span class="code">release_memory</span> 或 <span class="code">purge_memory</span> 来释放。</p>

-  <h3>Out-of-Memory Conditions: Exceptions vs. Null Return</h3>
+ <h3>Out-of-Memory Conditions: Exceptions vs. Null Return 内存用尽的情 况:异常 与 返回空值</h3>

   <p>Some Pool interfaces throw exceptions when out-of-memory; others will
return 0. In general, unless mandated by the Standard, Pool interfaces will
-  always prefer to return 0 instead of throw an exception.</p>
+ always prefer to return 0 instead of throw an exception.<br>有些 Pool 接 口在内存用尽时抛出异常;有些则返回 0. 通常,除非标准有规定,Pool 接口总是优 先返回 0 而不是抛出异常。</p>

-  <h2>The Interfaces</h2>
+  <h2>The Interfaces 接口</h2>

   <h3>pool</h3>

<p>The <a href="interfaces/pool.html">pool interface</a> is a simple Object
-  Usage interface with Null Return.</p>
+ Usage interface with Null Return.<br><a href="interfaces/pool.html">pool 接口</a> 是一个简单的对象用法接口,它采用空值返回。</p>

-  <p>Example:</p>
-  <pre class="code">
-void func()
-{
-  boost::pool&lt;&gt; p(sizeof(int));
-  for (int i = 0; i &lt; 10000; ++i)
-  {
-    int * const t = p.malloc();
-    ... // Do something with t; don't take the time to free() it
-  }
-} // on function exit, p is destroyed, and all malloc()'ed ints are implicitly freed
-</pre>
+  <p>Example:<br>例子:</p>
+ <pre class="code">void func()<br>{<br> boost::pool&lt;&gt; p(sizeof(int));<br> for (int i = 0; i &lt; 10000; ++i)<br> {<br> int * const t = p.malloc();<br> ... // Do something with t; don't take the time to free() it<br> // 使用 t,不用关心何时 free() 它<br> }<br>} // on function exit, p is destroyed, and all malloc()'ed ints are implicitly freed<br> // 函数退出时,p 被销毁,所有被 malloc() 的整数都被暗 中释放<br></pre>

   <h3>object_pool</h3>

@@ -69,85 +53,47 @@
   Object Usage interface with Null Return, but is aware of the type of the
   object for which it is allocating chunks. On destruction, any chunks that
   have been allocated from that object_pool will have their destructors
-  called.</p>
+ called.<br><a href="interfaces/object_pool.html">object_pool interface</a> 是一个采用空值返回的对象用法接口,不过它需要知道分配区块的对象 类型。在析构时,所有从该 object_pool 分配的区块都会调用它们的析构函数。</p>

-  <p>Example:</p>
-  <pre class="code">
-struct X { ... }; // has destructor with side-effects
-
-void func()
-{
-  boost::object_pool&lt;X&gt; p;
-  for (int i = 0; i &lt; 10000; ++i)
-  {
-    X * const t = p.malloc();
-    ... // Do something with t; don't take the time to free() it
-  }
-} // on function exit, p is destroyed, and all destructors for the X objects are called
-</pre>
+  <p>Example:<br>例子:</p>
+ <pre class="code">struct X { ... }; // has destructor with side-effects 带有副作用的析构函数<br><br>void func()<br>{<br> boost::object_pool&lt;X&gt; p;<br> for (int i = 0; i &lt; 10000; ++i)<br> {<br> X * const t = p.malloc();<br> ... // Do something with t; don't take the time to free() it<br> // 使用 t,不用关心何时 free() 它 }<br>} // on function exit, p is destroyed, and all destructors for the X objects are called<br> // 函数退出时,p 被销毁,所有 X 对象的析构函数被调用 </pre>

   <h3>singleton_pool</h3>

<p>The <a href="interfaces/singleton_pool.html">singleton_pool interface</a> is a Singleton Usage interface with Null Return. It's just the same as the
-  pool interface but with Singleton Usage instead.</p>
+ pool interface but with Singleton Usage instead.<br><a href="interfaces/singleton_pool.html">singleton_pool interface</a> + 是一个采用空值返回的单件用法接口。它与 pool 接口相同,除了是单件用法。 </p>

-  <p>Example:</p>
-  <pre class="code">
-struct MyPoolTag { };
-
-typedef boost::singleton_pool&lt;MyPoolTag, sizeof(int)&gt; my_pool;
-void func()
-{
-  for (int i = 0; i &lt; 10000; ++i)
-  {
-    int * const t = my_pool::malloc();
-    ... // Do something with t; don't take the time to free() it
-  }
-  // Explicitly free all malloc()'ed int's
-  my_pool::purge_memory();
-}
-</pre>
+  <p>Example:<br>例子:</p>
+ <pre class="code">struct MyPoolTag { };<br><br>typedef boost::singleton_pool&lt;MyPoolTag, sizeof(int)&gt; my_pool;<br>void func()<br>{<br> for (int i = 0; i &lt; 10000; ++i)<br> {<br> int * const t = my_pool::malloc();<br> ... // Do something with t; don't take the time to free() it<br> // 使用 t,不用关心何时 free() 它 } }<br> // Explicitly free all malloc()'ed int's 显式释放所有被 malloc() 的整 数<br> my_pool::purge_memory();<br>}<br></pre>

   <h3>pool_alloc</h3>

   <p>The <a href="interfaces/pool_alloc.html">pool_alloc interface</a> is a
Singleton Usage interface with Exceptions. It is built on the singleton_pool
   interface, and provides a Standard Allocator-compliant class (for use in
-  containers, etc.).</p>
+ containers, etc.).<br><a href="interfaces/pool_alloc.html">pool_alloc interface</a> 是一个采用异常方式的单件用法接口。它是在 singleton_pool + 接口的基础上构建的,并提供了一个符合标准分配器规范的类(可用于标准容器)。 </p>

-  <p>Example:</p>
-  <pre class="code">
-void func()
-{
-  std::vector&lt;int, boost::pool_allocator&lt;int&gt; &gt; v;
-  for (int i = 0; i &lt; 10000; ++i)
-    v.push_back(13);
-} // Exiting the function does NOT free the system memory allocated by the pool allocator
-  // You must call
- // boost::singleton_pool&lt;boost::pool_allocator_tag, sizeof(int)&gt;::release_memory()
-  // in order to force that
-</pre>
+  <p>Example:<br>例子:</p>
+ <pre class="code">void func()<br>{<br> std::vector&lt;int, boost::pool_allocator&lt;int&gt; &gt; v;<br> for (int i = 0; i &lt; 10000; ++i)<br> v.push_back(13);<br>} // Exiting the function does NOT free the system memory allocated by the pool allocator<br> // You must call<br> // boost::singleton_pool&lt;boost::pool_allocator_tag, sizeof(int)&gt;::release_memory()<br> // in order to force that<br> // 退 出该函数不会释放内存池分配器所分配的系统内存。你必须调用<br> // boost::singleton_pool&lt;boost::pool_allocator_tag, sizeof(int)&gt;::release_memory() 来强制释放<br></pre>

-  <h2>Future Directions</h2>
+  <h2>Future Directions 未来的方向</h2>

<p>Another pool interface will be written: a base class for per-class pool - allocation. This &quot;pool_base&quot; interface will be Singleton Usage with
-  Exceptions, and built on the singleton_pool interface.</p>
+  allocation. This "pool_base" interface will be Singleton Usage with
+ Exceptions, and built on the singleton_pool interface.<br>将编写另一个内 存池接口:一个基类用于单个类的内存池分配。这个 "pool_base" 接口将会是采用异 常方式的单件用法,并基于 singleton_pool 接口构建。</p>
   <hr>

- <p><a href="http://validator.w3.org/check?uri=referer";><img border="0" src= - "http://www.w3.org/Icons/valid-html401"; alt="Valid HTML 4.01 Transitional"
-  height="31" width="88"></a></p>
+ <p><a href="http://validator.w3.org/check?uri=referer";><img src="http://www.w3.org/Icons/valid-html401"; alt="Valid HTML 4.01 Transitional" border="0" height="31" width="88"></a></p>

   <p>Revised
<!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %B, %Y" startspan -->05 December, 2006<!--webbot bot="Timestamp" endspan i-checksum="38516" --></p>

- <p><i>Copyright &copy; 2000, 2001 Stephen Cleary (scleary AT jerviswebb DOT com)</i></p> + <p><i>Copyright (c) 2000, 2001 Stephen Cleary (scleary AT jerviswebb DOT com)</i></p>

   <p><i>Distributed under the Boost Software License, Version 1.0. (See
accompanying file <a href="../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a> or
-  copy at <a href=
-  
"http://www.boost.org/LICENSE_1_0.txt";>http://www.boost.org/LICENSE_1_0.txt</a>)</i></p>
-</body>
-</html>
+ copy at <a href="http://www.boost.org/LICENSE_1_0.txt";>http://www.boost.org/LICENSE_1_0.txt</a>)</i></p>
+</body></html>
\ No newline at end of file

Modified: trunk/libs/pool/doc/interfaces/object_pool.html
==============================================================================
--- trunk/libs/pool/doc/interfaces/object_pool.html     (original)
+++ trunk/libs/pool/doc/interfaces/object_pool.html     Wed May 27 01:51:16 2009
@@ -1,76 +1,47 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
-"http://www.w3.org/TR/html4/loose.dtd";>
-
-<html>
-<head>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd";>
+<html><head>
   <meta http-equiv="Content-Language" content="en-us">
-  <meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
+  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
   <link href="../pool.css" rel="stylesheet" type="text/css">

-  <title>object_pool - Boost Object Pool Allocator</title>
-</head>
-
+  <title>object_pool - Boost Object Pool Allocator</title></head>
 <body>
-  <img src="../../../../boost.png" width="276" height="86" alt="C++ Boost">
+  <img src="../../../../boost.png" alt="C++ Boost" height="86" width="276">

   <h1 align="center">object_pool - Boost Object Pool Allocator</h1>

-  <h2>Introduction</h2>
+  <h2>Introduction 简介</h2>

   <p>object_pool.hpp provides a template type that can be used for fast and
   efficient memory allocation. It also provides automatic destruction of
non-deallocated objects. For information on other pool-based interfaces, see <a href="../interfaces.html">
-  the other pool interfaces</a>.</p>
+ the other pool interfaces</a>.<br>object_pool.hpp 提供了一个模板类型,可 用于快速高效的内存分配。它还提供了未释放对象的析构。有关其它内存池接口的信 息,请见 <a href="../interfaces.html">
+  其它内存池接口</a>。</p>

-  <h2>Synopsis</h2>
-  <pre class="code">
-template &lt;typename ElementType, typename UserAllocator = default_user_allocator_new_delete&gt;
-class object_pool
-{
-  private:
-    object_pool(const object_pool &amp;);
-    void operator=(const ob

==============================================================================
Diff truncated at 200k characters

Other related posts:

  • » [boost-doc-zh commit] r246 - 完成 pool 库的文档翻译 - codesite-noreply