Command& CommandCache::clone( Command& from ) { EQ_TS_THREAD( _thread ); const Cache which = (from->size>Packet::minSize) ? CACHE_BIG : CACHE_SMALL; Command& command = _newCommand( which ); command._clone( from ); return command; }
Command& CommandCache::alloc( NodePtr node, LocalNodePtr localNode, const uint64_t size ) { EQ_TS_THREAD( _thread ); const Cache which = (size > Packet::minSize) ? CACHE_BIG : CACHE_SMALL; _compact( which ); Command& command = _newCommand( which ); command._alloc( node, localNode, size ); return command; }
Command& CommandCache::alloc( NodePtr node, LocalNodePtr localNode, const uint64_t size ) { EQ_TS_THREAD( _thread ); EQASSERTINFO( size < EQ_BIT48, "Out-of-sync network stream: packet size " << size << "?" ); const Cache which = (size > Packet::minSize) ? CACHE_BIG : CACHE_SMALL; _compact( which ); Command& command = _newCommand( which ); command.alloc_( node, localNode, size ); return command; }