Fix GC doc
authorkhizmax <khizmax@gmail.com>
Mon, 17 Nov 2014 10:57:24 +0000 (13:57 +0300)
committerkhizmax <khizmax@gmail.com>
Mon, 17 Nov 2014 10:57:24 +0000 (13:57 +0300)
cds/gc/details/hp.h
cds/gc/hp.h
cds/gc/impl/hp_decl.h

index 1c2545189d9118f0c8cd426c0fd3867e90a51d80..9e191b09bf7e1eea55ff52b0898a5d3b93141b00 100644 (file)
 
 //@cond
 namespace cds {
-    /**
-        @page cds_garbage_collectors_comparison GC comparison
-        @ingroup cds_garbage_collector
-
-        <table>
-            <tr>
-                <th>Feature</th>
-                <th>%cds::gc::HP</th>
-                <th>%cds::gc::DHP</th>
-            </tr>
-            <tr>
-                <td>Implementation quality</td>
-                <td>stable</td>
-                <td>stable</td>
-            </tr>
-            <tr>
-                <td>Performance rank (1 - slowest, 5 - fastest)</td>
-                <td>5</td>
-                <td>4</td>
-            </tr>
-            <tr>
-                <td>Max number of guarded (hazard) pointers per thread</td>
-                <td>limited (specifies in GC object ctor)</td>
-                <td>unlimited (dynamically allocated when needed)</td>
-            </tr>
-            <tr>
-                <td>Max number of retired pointers<sup>1</sup></td>
-                <td>bounded</td>
-                <td>bounded</td>
-           </tr>
-            <tr>
-                <td>Array of retired pointers</td>
-                <td>preallocated for each thread, limited in size</td>
-                <td>global for the entire process, unlimited (dynamically allocated when needed)</td>
-            </tr>
-            <tr>
-                <td>Support direct pointer to item of lock-free container (useful for iterators)</td>
-                <td>not supported</td>
-                <td>not supported</td>
-            </tr>
-        </table>
-
-        <sup>1</sup>Unbounded count of retired pointer means a possibility of memory exhaustion.
-    */
-
     /// Different safe memory reclamation schemas (garbage collectors)
     /** @ingroup cds_garbage_collector
 
index eea63e4e6e2da113788dc2338ede39e26995183d..0fab88e51ec335944349ee7c0b470285f4ab5510 100644 (file)
@@ -7,4 +7,63 @@
 #include <cds/gc/impl/hp_impl.h>
 #include <cds/details/lib.h>
 
+/**
+    @page cds_garbage_collectors_comparison GC comparison
+    @ingroup cds_garbage_collector
+
+    <table>
+        <tr>
+            <th>Feature</th>
+            <th>%cds::gc::HP</th>
+            <th>%cds::gc::DHP</th>
+        </tr>
+        <tr>
+            <td>Implementation quality</td>
+            <td>stable</td>
+            <td>stable</td>
+        </tr>
+        <tr>
+            <td>Performance rank (1 - slowest, 5 - fastest)</td>
+            <td>5</td>
+            <td>4</td>
+        </tr>
+        <tr>
+            <td>Max number of guarded (hazard) pointers per thread</td>
+            <td>limited (specifies in GC object ctor)</td>
+            <td>unlimited (dynamically allocated when needed)</td>
+        </tr>
+        <tr>
+            <td>Max number of retired pointers<sup>1</sup></td>
+            <td>bounded</td>
+            <td>bounded</td>
+        </tr>
+        <tr>
+            <td>Array of retired pointers</td>
+            <td>preallocated for each thread, limited in size</td>
+            <td>global for the entire process, unlimited (dynamically allocated when needed)</td>
+        </tr>
+        <tr>
+            <td>Support direct pointer to item of lock-free container (useful for iterators)</td>
+            <td>not supported</td>
+            <td>not supported</td>
+        </tr>
+    </table>
+
+    <sup>1</sup>Unbounded count of retired pointer means a possibility of memory exhaustion.
+*/
+
+namespace cds {
+
+    /// Different safe memory reclamation schemas (garbage collectors)
+    /** @ingroup cds_garbage_collector
+
+        This namespace specifies different safe memory reclamation (SMR) algorithms.
+        See \ref cds_garbage_collector "Garbage collectors"
+    */
+    namespace gc {
+    } // namespace gc
+
+} // namespace cds
+
+
 #endif  // #ifndef __CDS_GC_HP_H
index 4a0593a6cddc547e9edb65afdd572fed0112da22..14c98314acbaae9c12291c472533fb8a40cabd58 100644 (file)
@@ -21,6 +21,9 @@ namespace cds { namespace gc {
             - [2003] Maged M.Michael "Hazard Pointers: Safe memory reclamation for lock-free objects"
             - [2004] Andrei Alexandrescy, Maged Michael "Lock-free Data Structures with Hazard Pointers"
 
+        Hazard Pointer garbage collector is a singleton. The main user-level part of Hazard Pointer schema is
+        GC class \p %cds::gc::HP and its nested classes. Before use any HP-related class you must initialize HP garbage collector
+        by contructing \p %cds::gc::HP object in beginning of your \p main().
         See \ref cds_how_to_use "How to use" section for details how to apply garbage collector.
     */
     class HP