Exemplo n.º 1
0
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;
}
Exemplo n.º 2
0
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;
}
Exemplo n.º 3
0
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;
}