X-Git-Url: http://plrg.eecs.uci.edu/git/?p=libcds.git;a=blobdiff_plain;f=cds%2Fintrusive%2Fimpl%2Ffeldman_hashset.h;h=95f1888af8dfe34583e7114df9929a59859ff9c3;hp=279641b3bc9accf8d189d365a9294b2ff57304db;hb=8abb8f5e76bd8d723aff8078934ee30e59fa117a;hpb=40e34e6d0b104b6f5aff506ad67d43fd410e52bc diff --git a/cds/intrusive/impl/feldman_hashset.h b/cds/intrusive/impl/feldman_hashset.h index 279641b3..95f1888a 100644 --- a/cds/intrusive/impl/feldman_hashset.h +++ b/cds/intrusive/impl/feldman_hashset.h @@ -565,8 +565,8 @@ namespace cds { namespace intrusive { public: /// Creates empty set /** - @param head_bits: 2head_bits specifies the size of head array, minimum is 4. - @param array_bits: 2array_bits specifies the size of array node, minimum is 2. + @param head_bits - 2head_bits specifies the size of head array, minimum is 4. + @param array_bits - 2array_bits specifies the size of array node, minimum is 2. Equation for \p head_bits and \p array_bits: \code @@ -640,8 +640,12 @@ namespace cds { namespace intrusive { return false; } - // the slot must be expanded - base_class::expand_slot( pos, slot ); + if ( !pos.splitter.eos()) { + // the slot must be expanded + base_class::expand_slot( pos, slot ); + } + else + return false; } else { // the slot is empty, try to insert data node @@ -1215,8 +1219,12 @@ namespace cds { namespace intrusive { } if ( bInsert ) { - // the slot must be expanded - base_class::expand_slot( pos, slot ); + if ( !pos.splitter.eos()) { + // the slot must be expanded + base_class::expand_slot( pos, slot ); + } + else + return std::make_pair( false, false ); } else { stats().onUpdateFailed();