EllenBinTreeMap refactoring
[libcds.git] / src / hzp_const.h
1 //$$CDS-header$$
2
3 #ifndef __CDSIMPL_HZP_CONST_H
4 #define __CDSIMPL_HZP_CONST_H
5
6 /*
7     File: hzp_const.h
8
9     Michael's Hazard Pointer reclamation schema global constants
10     Gidenstam's reclamation schema global constants
11
12     Editions:
13         2008.03.10    Maxim.Khiszinsky    Created
14 */
15
16 namespace cds { namespace gc {
17
18     //---------------------------------------------------------------
19     // Hazard Pointers reclamation schema constants
20     namespace hzp {
21         // Max number of threads expected
22         static const size_t c_nMaxThreadCount     = 100;
23
24         // Number of Hazard Pointers per thread
25         static const size_t c_nHazardPointerPerThread = 8;
26     } // namespace hzp
27
28     //---------------------------------------------------------------
29     // HRC (Gidenstam) reclamation schema constants
30     namespace hrc {
31         using cds::gc::hzp::c_nMaxThreadCount;
32         using cds::gc::hzp::c_nHazardPointerPerThread;
33
34         /// Number of Hazard Pointers per thread for Node::CleanUp methods
35         static const size_t c_nCleanUpHazardPointerPerThread = 2;
36
37         /// Max number of links for HRC node
38         static const size_t c_nHRCMaxNodeLinkCount = 4;
39
40         /// Max number of links in live node that may transiently point to a deleted node
41         static const size_t c_nHRCMaxTransientLinks = c_nHRCMaxNodeLinkCount;
42     }    // namespace hrc
43 } /* namespace gc */ }    /* namespace cds */
44
45 #endif    // #ifndef __CDSIMPL_HZP_CONST_H