From: Victor Grishchenko Date: Sat, 16 Jan 2010 19:06:42 +0000 (+0100) Subject: Renamed "bins" to binmap_t X-Git-Url: http://p2p-next.cs.pub.ro/gitweb/?a=commitdiff_plain;h=26fe088bfabfe891c69d338e0f35e18ae57bd885;p=swift-upb.git Renamed "bins" to binmap_t ...well, it does not exactly mimic STL conventions, but at least... --- diff --git a/bin64.h b/bin64.h index 1ba8532..9045fe7 100644 --- a/bin64.h +++ b/bin64.h @@ -164,7 +164,7 @@ struct bin64_t { /** Depth-first in-order binary tree traversal. */ bin64_t next_dfsio (uint8_t floor); - /** Return the number of basci bins within this bin. */ + /** Return the number of basic bins within this bin. */ bin64_t width () const { return (tail_bits()+1)>>1; } diff --git a/bins.cpp b/bins.cpp index ee5fbf8..1c20dd4 100644 --- a/bins.cpp +++ b/bins.cpp @@ -13,14 +13,14 @@ // make it work piece by piece -const uint8_t bins::SPLIT[16] = +const uint8_t binmap_t::SPLIT[16] = {0, 3, 12, 15, 48, 51, 60, 63, 192, 195, 204, 207, 240, 243, 252, 255}; -const uint8_t bins::JOIN[16] = +const uint8_t binmap_t::JOIN[16] = {0, 1, 4, 5, 2, 3, 6, 7, 8, 9, 12, 13, 10, 11, 14, 15}; -const int bins::NOJOIN = 0x10000; +const int binmap_t::NOJOIN = 0x10000; -void bins::extend () { +void binmap_t::extend () { uint16_t nblocks = blocks_allocated ? (blocks_allocated<<1) : 1; size_t had_bytes = blocks_allocated<<6; size_t need_bytes = nblocks<<6; @@ -31,26 +31,26 @@ void bins::extend () { blocks_allocated = nblocks; } -bins::bins() : height(4), blocks_allocated(0), cells(NULL), +binmap_t::binmap_t() : height(4), blocks_allocated(0), cells(NULL), ap(0), cells_allocated(0), twist_mask(0) { extend(); assert(!alloc_cell()); } -void bins::twist (uint64_t mask) { +void binmap_t::twist (uint64_t mask) { while ( (1<29 ) @@ -65,7 +65,7 @@ void bins::dump (const char* note) { printf("\n"); } -uint32_t bins::split16to32(uint16_t halfval) { +uint32_t binmap_t::split16to32(uint16_t halfval) { uint32_t nval = 0; for(int i=0; i<4; i++) { nval >>= 8; @@ -76,7 +76,7 @@ uint32_t bins::split16to32(uint16_t halfval) { } -int bins::join32to16(uint32_t cval) { +int binmap_t::join32to16(uint32_t cval) { union { uint32_t i; uint8_t a[4]; } uvar; uvar.i = cval & (cval>>1) & 0x55555555; if ( (uvar.i|(uvar.i<<1)) != cval ) @@ -91,7 +91,7 @@ int bins::join32to16(uint32_t cval) { } -void bins::split (uint32_t half) { +void binmap_t::split (uint32_t half) { if (deep(half)) return; uint32_t cell = alloc_cell(), left=cell<<1, right=left+1; @@ -104,7 +104,7 @@ void bins::split (uint32_t half) { } -bool bins::join (uint32_t half) { +bool binmap_t::join (uint32_t half) { uint32_t cellno = halves[half]; int left = cellno<<1, right=left+1; if (deep(left) || deep(right)) @@ -120,7 +120,7 @@ bool bins::join (uint32_t half) { return true; } -void bins::free_cell (uint16_t cell) { +void binmap_t::free_cell (uint16_t cell) { cells[cell] = 0; int left = cell<<1, right=left+1; mark(left); @@ -131,7 +131,7 @@ void bins::free_cell (uint16_t cell) { } /** Get a free cell. */ -uint16_t bins::alloc_cell () { +uint16_t binmap_t::alloc_cell () { uint16_t ap1 = ap; cells_allocated++; for(; ap<(blocks_allocated<<4); ap++) { @@ -165,7 +165,7 @@ bin64_t iterator::next (bool need_solid) { } -iterator::iterator(bins* host_, bin64_t start, bool split) { +iterator::iterator(binmap_t* host_, bin64_t start, bool split) { host = host_; half = 0; for(int i=0; i<64; i++) @@ -200,7 +200,7 @@ void iterator::to (bool right) { } -void bins::extend_range () { +void binmap_t::extend_range () { assert(height<62); height++; uint16_t newroot = alloc_cell(); @@ -231,7 +231,7 @@ void iterator::parent () { } -bin64_t bins::find (const bin64_t range, fill_t seek) { +bin64_t binmap_t::find (const bin64_t range, fill_t seek) { iterator i(this,range,true); fill_t stop = seek==EMPTY ? FILLED : EMPTY; while (true) { @@ -250,7 +250,7 @@ bin64_t bins::find (const bin64_t range, fill_t seek) { } -uint16_t bins::get (bin64_t bin) { +uint16_t binmap_t::get (bin64_t bin) { if (bin==bin64_t::NONE) return EMPTY; iterator i(this,bin,true); @@ -263,18 +263,18 @@ uint16_t bins::get (bin64_t bin) { } -void bins::clear () { +void binmap_t::clear () { set(bin64_t(height,0),EMPTY); } -uint64_t bins::mass () { +uint64_t binmap_t::mass () { iterator i(this,bin64_t(0,0),false); uint64_t ret = 0; while (!i.solid()) i.left(); while (!i.end()) { - if (*i==bins::FILLED) + if (*i==binmap_t::FILLED) ret += i.pos.width(); i.next(true); } @@ -282,7 +282,7 @@ uint64_t bins::mass () { } -void bins::set (bin64_t bin, fill_t val) { +void binmap_t::set (bin64_t bin, fill_t val) { if (bin==bin64_t::NONE) return; assert(val==FILLED || val==EMPTY); @@ -301,11 +301,11 @@ void bins::set (bin64_t bin, fill_t val) { } -uint64_t* bins::get_stripes (int& count) { +uint64_t* binmap_t::get_stripes (int& count) { int size = 32; uint64_t *stripes = (uint64_t*) malloc(32*8); count = 0; - uint16_t cur = bins::EMPTY; + uint16_t cur = binmap_t::EMPTY; stripes[count++] = 0; iterator i(this,bin64_t(0,0),false); while (!i.solid()) @@ -333,7 +333,7 @@ uint64_t* bins::get_stripes (int& count) { } -void bins::remove (bins& b) { +void binmap_t::remove (binmap_t& b) { uint8_t start_lr = b.height>height ? b.height : height; bin64_t top(start_lr,0); iterator zis(this,top), zat(&b,top); @@ -352,7 +352,7 @@ void bins::remove (bins& b) { } -bin64_t bins::cover(bin64_t val) { +bin64_t binmap_t::cover(bin64_t val) { if (val==bin64_t::NONE) return val; iterator i(this,val,false); @@ -364,8 +364,8 @@ bin64_t bins::cover(bin64_t val) { } -bin64_t bins::find_filtered - (bins& filter, bin64_t range, fill_t seek) +bin64_t binmap_t::find_filtered + (binmap_t& filter, bin64_t range, fill_t seek) { if (range==bin64_t::ALL) range = bin64_t ( height>filter.height ? height : filter.height, 0 ); @@ -392,7 +392,7 @@ bin64_t bins::find_filtered } // FIXME unite with remove(); do bitwise() -void bins::copy_range (bins& origin, bin64_t range) { +void binmap_t::copy_range (binmap_t& origin, bin64_t range) { if (range==bin64_t::ALL) range = bin64_t ( height>origin.height ? height : origin.height, 0 ); iterator zis(this,range,true), zat(&origin,range,true); @@ -410,7 +410,7 @@ void bins::copy_range (bins& origin, bin64_t range) { } } -uint64_t bins::seq_length () { +uint64_t binmap_t::seq_length () { iterator i(this); if (!i.deep() && *i==FILLED) return i.pos.width(); @@ -424,7 +424,7 @@ uint64_t bins::seq_length () { } -bool bins::is_solid (bin64_t range, fill_t val) { +bool binmap_t::is_solid (bin64_t range, fill_t val) { if (range==bin64_t::ALL) return !deep(0) && (is_mixed(val) || halves[0]==val); iterator i(this,range,false); diff --git a/bins.h b/bins.h index 8d05680..c6a69f1 100644 --- a/bins.h +++ b/bins.h @@ -13,7 +13,7 @@ /** A binmap covering 2^64 range. Binmap is a hybrid of a bitmap (aka bit vector) and a binary tree. The key ability of a binmap is the aggregation of solid (all-0 or all-1) ranges. */ -class bins { +class binmap_t { public: /** Need a 3-valued logic as a range might be either all-0 or all-1 @@ -25,10 +25,10 @@ public: typedef enum { FILLED=0xffff, EMPTY=0x0000, MIXED=0x5555 } fill_t; static const int NOJOIN; - bins(); + binmap_t(); /** Copying constructor. */ - bins(const bins& b); + binmap_t(const binmap_t& b); /** Get value for the bin. */ uint16_t get (bin64_t bin); @@ -37,7 +37,7 @@ public: void set (bin64_t bin, fill_t val=FILLED); /** Copy a range from another binmap. */ - void copy_range (bins& origin, bin64_t range); + void copy_range (binmap_t& origin, bin64_t range); /** Find the leftmost bin within the specified range which is either filled or empty. */ @@ -47,11 +47,11 @@ public: either filled or empty. Bins set to 1 in the filter binmap cannot be returned. In fact, this is an incremental bitwise op. */ bin64_t find_filtered - (bins& filter, bin64_t range, fill_t seek=EMPTY) ; + (binmap_t& filter, bin64_t range, fill_t seek=EMPTY) ; /** Bitwise SUB; any bins set to one in the filter binmap should be set to 0 in this binmap. */ - void remove (bins& filter); + void remove (binmap_t& filter); void dump(const char* note); @@ -155,17 +155,17 @@ private: or FILLED/EMPTY. */ class iterator { public: // rm this - bins *host; + binmap_t *host; uint32_t history[64]; uint32_t half; uint8_t layer_; bin64_t pos; // TODO: half[] layer bin public: - iterator(bins* host, bin64_t start=bin64_t(0,0), bool split=false); + iterator(binmap_t* host, bin64_t start=bin64_t(0,0), bool split=false); ~iterator(); bool deep () { return host->deep(half); } bool solid () { - return !deep() && bins::is_solid(host->halves[half]); + return !deep() && binmap_t::is_solid(host->halves[half]); } void sibling () { half^=1; pos=pos.sibling(); } bool end () { return half==1; } diff --git a/ext/seq_picker.cpp b/ext/seq_picker.cpp index 2a2290d..3132236 100644 --- a/ext/seq_picker.cpp +++ b/ext/seq_picker.cpp @@ -13,7 +13,7 @@ using namespace p2tp; class SeqPiecePicker : public PiecePicker { - bins ack_hint_out_; + binmap_t ack_hint_out_; tbqueue hint_out_; FileTransfer* transfer_; uint64_t twist_; @@ -33,7 +33,7 @@ public: twist_ = twist; } - virtual bin64_t Pick (bins& offer, uint64_t max_width, tint expires) { + virtual bin64_t Pick (binmap_t& offer, uint64_t max_width, tint expires) { while (hint_out_.size() && hint_out_.front().timemax_width) hint = hint.left(); - assert(ack_hint_out_.get(hint)==bins::EMPTY); + assert(ack_hint_out_.get(hint)==binmap_t::EMPTY); ack_hint_out_.set(hint); hint_out_.push_back(tintbin(NOW,hint)); return hint; diff --git a/hashtree.cpp b/hashtree.cpp index 0a4626f..47213e7 100644 --- a/hashtree.cpp +++ b/hashtree.cpp @@ -286,14 +286,14 @@ bool HashTree::OfferHash (bin64_t pos, const Sha1Hash& hash) { return false; if (peak==pos) return hash == hashes_[pos]; - if (ack_out_.get(pos.parent())!=bins::EMPTY) + if (ack_out_.get(pos.parent())!=binmap_t::EMPTY) return hash==hashes_[pos]; // have this hash already, even accptd data hashes_[pos] = hash; if (!pos.is_base()) return false; // who cares? bin64_t p = pos; Sha1Hash uphash = hash; - while ( p!=peak && ack_out_.get(p)==bins::EMPTY ) { + while ( p!=peak && ack_out_.get(p)==binmap_t::EMPTY ) { hashes_[p] = uphash; p = p.parent(); uphash = Sha1Hash(hashes_[p.left()],hashes_[p.right()]) ; @@ -309,7 +309,7 @@ bool HashTree::OfferData (bin64_t pos, const char* data, size_t lengt return false; if (length<1024 && pos!=bin64_t(0,sizek_-1)) return false; - if (ack_out_.get(pos)==bins::FILLED) + if (ack_out_.get(pos)==binmap_t::FILLED) return true; // to set data_in_ bin64_t peak = peak_for(pos); if (peak==bin64_t::NONE) @@ -322,7 +322,7 @@ bool HashTree::OfferData (bin64_t pos, const char* data, size_t lengt } //printf("g %lli %s\n",(uint64_t)pos,hash.hex().c_str()); - ack_out_.set(pos,bins::FILLED); + ack_out_.set(pos,binmap_t::FILLED); pwrite(fd_,data,length,pos.base_offset()<<10); complete_ += length; completek_++; diff --git a/hashtree.h b/hashtree.h index 8e877d4..7878bf1 100644 --- a/hashtree.h +++ b/hashtree.h @@ -70,7 +70,7 @@ class HashTree { /** Part of the tree currently checked. */ size_t complete_; size_t completek_; - bins ack_out_; + binmap_t ack_out_; protected: @@ -122,7 +122,7 @@ public: bool is_complete () { return size_ && complete_==size_; } /** The binmap of complete packets. */ - bins& ack_out () { return ack_out_; } + binmap_t& ack_out () { return ack_out_; } ~HashTree (); diff --git a/p2tp.h b/p2tp.h index df26eef..6812db5 100644 --- a/p2tp.h +++ b/p2tp.h @@ -152,7 +152,7 @@ namespace p2tp { return fdmax(1,(int)cwnd_)) my_pick = my_pick.left(); file().ack_out().twist(0); @@ -75,7 +75,7 @@ bin64_t Channel::DequeueHint () { } //if (time < NOW-TINT_SEC*3/2 ) // continue; bad idea - if (ack_in_.get(hint)!=bins::FILLED) + if (ack_in_.get(hint)!=binmap_t::FILLED) send = hint; } uint64_t mass = 0; @@ -254,7 +254,7 @@ void Channel::AddAck (Datagram& dgram) { data_in_dbl_ = pos; } for(int count=0; count<4; count++) { - bin64_t ack = file().ack_out().find_filtered(ack_out_, bin64_t::ALL, bins::FILLED); + bin64_t ack = file().ack_out().find_filtered(ack_out_, bin64_t::ALL, binmap_t::FILLED); if (ack==bin64_t::NONE) break; ack = file().ack_out().cover(ack); @@ -439,7 +439,7 @@ void Channel::OnTs (Datagram& dgram) { void Channel::OnHint (Datagram& dgram) { bin64_t hint = dgram.Pull32(); hint_in_.push_back(hint); - //ack_in_.set(hint,bins::EMPTY); + //ack_in_.set(hint,binmap_t::EMPTY); //RequeueSend(cc_->OnHintRecvd(hint)); dprintf("%s #%u -hint %s\n",tintstr(),id,hint.str()); } diff --git a/tests/binstest2.cpp b/tests/binstest2.cpp index 7d5d2c4..0b42936 100755 --- a/tests/binstest2.cpp +++ b/tests/binstest2.cpp @@ -16,40 +16,40 @@ TEST(BinsTest,Routines) { uint32_t cell = (3<<10) | (3<<14) | (3<<0); uint16_t correct = (1<<5) | (1<<7) | (1<<0); - uint16_t joined = bins::join32to16(cell); + uint16_t joined = binmap_t::join32to16(cell); EXPECT_EQ(correct,joined); - uint32_t split = bins::split16to32(correct); + uint32_t split = binmap_t::split16to32(correct); EXPECT_EQ(cell,split); - EXPECT_EQ(bins::NOJOIN,bins::join32to16(cell|4)); + EXPECT_EQ(binmap_t::NOJOIN,binmap_t::join32to16(cell|4)); } TEST(BinsTest,SetGet) { - bins bs; + binmap_t bs; bin64_t b3(1,0), b2(0,1), b4(0,2), b6(1,1), b7(2,0); bs.set(b3); //bs.dump("set done"); - EXPECT_EQ(bins::FILLED,bs.get(b3)); + EXPECT_EQ(binmap_t::FILLED,bs.get(b3)); //bs.dump("set checkd"); - EXPECT_EQ(bins::FILLED,bs.get(b2)); + EXPECT_EQ(binmap_t::FILLED,bs.get(b2)); //bs.dump("get b2 done"); - EXPECT_EQ(bins::FILLED,bs.get(b3)); + EXPECT_EQ(binmap_t::FILLED,bs.get(b3)); //bs.dump("get b3 done"); - EXPECT_EQ(bins::EMPTY,bs.get(b4)); - EXPECT_EQ(bins::EMPTY,bs.get(b6)); - EXPECT_NE(bins::FILLED,bs.get(b7)); - EXPECT_NE(bins::EMPTY,bs.get(b7)); - EXPECT_EQ(bins::FILLED,bs.get(b3)); + EXPECT_EQ(binmap_t::EMPTY,bs.get(b4)); + EXPECT_EQ(binmap_t::EMPTY,bs.get(b6)); + EXPECT_NE(binmap_t::FILLED,bs.get(b7)); + EXPECT_NE(binmap_t::EMPTY,bs.get(b7)); + EXPECT_EQ(binmap_t::FILLED,bs.get(b3)); bs.set(bin64_t(1,1)); - EXPECT_EQ(bins::FILLED,bs.get(bin64_t(2,0))); + EXPECT_EQ(binmap_t::FILLED,bs.get(bin64_t(2,0))); } TEST(BinsTest,Iterator) { - bins b; + binmap_t b; b.set(bin64_t(3,1)); iterator i(&b,bin64_t(0,0),false); while (!i.solid()) @@ -57,69 +57,69 @@ TEST(BinsTest,Iterator) { EXPECT_EQ(bin64_t(3,0),i.bin()); EXPECT_EQ(false,i.deep()); EXPECT_EQ(true,i.solid()); - EXPECT_EQ(bins::EMPTY,*i); + EXPECT_EQ(binmap_t::EMPTY,*i); i.next(); EXPECT_EQ(bin64_t(3,1),i.bin()); EXPECT_EQ(false,i.deep()); EXPECT_EQ(true,i.solid()); - EXPECT_EQ(bins::FILLED,*i); + EXPECT_EQ(binmap_t::FILLED,*i); i.next(); EXPECT_TRUE(i.end()); } TEST(BinsTest,Chess) { - bins chess16; + binmap_t chess16; for(int i=0; i<15; i++) - chess16.set(bin64_t(0,i), (i&1)?bins::FILLED:bins::EMPTY); - chess16.set(bin64_t(0,15), bins::FILLED); + chess16.set(bin64_t(0,i), (i&1)?binmap_t::FILLED:binmap_t::EMPTY); + chess16.set(bin64_t(0,15), binmap_t::FILLED); for(int i=0; i<16; i++) - EXPECT_EQ((i&1)?bins::FILLED:bins::EMPTY, chess16.get(bin64_t(0,i))); - EXPECT_NE(bins::FILLED,chess16.get(bin64_t(4,0))); - EXPECT_NE(bins::EMPTY,chess16.get(bin64_t(4,0))); + EXPECT_EQ((i&1)?binmap_t::FILLED:binmap_t::EMPTY, chess16.get(bin64_t(0,i))); + EXPECT_NE(binmap_t::FILLED,chess16.get(bin64_t(4,0))); + EXPECT_NE(binmap_t::EMPTY,chess16.get(bin64_t(4,0))); for(int i=0; i<16; i+=2) - chess16.set(bin64_t(0,i), bins::FILLED); - EXPECT_EQ(bins::FILLED,chess16.get(bin64_t(4,0))); - EXPECT_EQ(bins::FILLED,chess16.get(bin64_t(2,3))); + chess16.set(bin64_t(0,i), binmap_t::FILLED); + EXPECT_EQ(binmap_t::FILLED,chess16.get(bin64_t(4,0))); + EXPECT_EQ(binmap_t::FILLED,chess16.get(bin64_t(2,3))); - chess16.set(bin64_t(4,1),bins::FILLED); - EXPECT_EQ(bins::FILLED,chess16.get(bin64_t(5,0))); + chess16.set(bin64_t(4,1),binmap_t::FILLED); + EXPECT_EQ(binmap_t::FILLED,chess16.get(bin64_t(5,0))); } TEST(BinsTest,Staircase) { const int TOPLAYR = 44; - bins staircase; + binmap_t staircase; for(int i=0;i(1<<3)) tw = tw.left(); tw = tw.twisted(1<<3); EXPECT_EQ(bin64_t(3,2),tw); b.twist(0); - EXPECT_EQ(bins::FILLED,b.get(bin64_t(3,2))); - EXPECT_EQ(bins::EMPTY,b.get(bin64_t(3,3))); + EXPECT_EQ(binmap_t::FILLED,b.get(bin64_t(3,2))); + EXPECT_EQ(binmap_t::EMPTY,b.get(bin64_t(3,3))); } TEST(BinsTest,SeqLength) { - bins b; + binmap_t b; b.set(bin64_t(3,0)); b.set(bin64_t(1,4)); b.set(bin64_t(0,10)); @@ -318,7 +318,7 @@ TEST(BinsTest,SeqLength) { TEST(BinsTest,EmptyFilled) { // 1112 3312 2111 .... - bins b; + binmap_t b; EXPECT_TRUE(b.is_empty(bin64_t::ALL)); @@ -332,7 +332,7 @@ TEST(BinsTest,EmptyFilled) { EXPECT_TRUE(b.is_empty(bin64_t(2,3))); EXPECT_FALSE(b.is_filled(bin64_t(2,3))); - EXPECT_TRUE(b.is_solid(bin64_t(2,3),bins::MIXED)); + EXPECT_TRUE(b.is_solid(bin64_t(2,3),binmap_t::MIXED)); EXPECT_TRUE(b.is_filled(bin64_t(1,0))); EXPECT_TRUE(b.is_filled(bin64_t(1,5))); EXPECT_FALSE(b.is_filled(bin64_t(1,3))); @@ -372,7 +372,7 @@ TEST(BinheapTest,Eat) { } /*TEST(BinsTest,AddSub) { - bins b; + binmap_t b; b|=15; b-=1; ASSERT_TRUE(b.contains(2)); @@ -397,7 +397,7 @@ TEST(BinsTest,Peaks) { } TEST(BinsTest,Performance) { - bins b; + binmap_t b; std::set s; clock_t start, end; double b_time, s_time; diff --git a/tests/freemap.cpp b/tests/freemap.cpp index 297cb07..721041a 100755 --- a/tests/freemap.cpp +++ b/tests/freemap.cpp @@ -17,7 +17,7 @@ #define RANDOM random #endif -int bins_stripe_count (bins& b) { +int bins_stripe_count (binmap_t& b) { int stripe_count; uint64_t * stripes = b.get_stripes(stripe_count); free(stripes); @@ -35,9 +35,9 @@ uint8_t rand_norm (uint8_t lim) { } TEST(FreemapTest,Freemap) { - bins space; + binmap_t space; const bin64_t top(30,0); - space.set(top,bins::EMPTY); + space.set(top,binmap_t::EMPTY); typedef std::pair timebin_t; typedef std::set ts_t; ts_t to_free; @@ -48,8 +48,8 @@ TEST(FreemapTest,Freemap) { while (alloc.layer()>lr) alloc = alloc.left(); ASSERT_NE(0ULL,~alloc); - EXPECT_EQ(bins::EMPTY, space.get(alloc)); - space.set(alloc,bins::FILLED); + EXPECT_EQ(binmap_t::EMPTY, space.get(alloc)); + space.set(alloc,binmap_t::FILLED); long dealloc_time = 1<first<=t) { bin64_t freebin = to_free.begin()->second; to_free.erase(to_free.begin()); - space.set(freebin,bins::EMPTY); + space.set(freebin,binmap_t::EMPTY); printf("freed at %lli\n", (uint64_t)freebin); } @@ -72,8 +72,8 @@ TEST(FreemapTest,Freemap) { //space.dump("space"); } for(ts_t::iterator i=to_free.begin(); i!=to_free.end(); i++) - space.set(i->second,bins::EMPTY); - EXPECT_EQ(bins::EMPTY,space.get(top)); + space.set(i->second,binmap_t::EMPTY); + EXPECT_EQ(binmap_t::EMPTY,space.get(top)); } int main (int argc, char** argv) {