Ignore:
Timestamp:
12/12/17 16:53:21 (6 years ago)
Author:
oabramkina
Message:

Improving buffer evaluation in the (rare) case of a context with no active fields.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/XIOS_DEV_CMIP6/src/node/context.cpp

    r1370 r1372  
    308308   { 
    309309      // Estimated minimum event size for small events (10 is an arbitrary constant just for safety) 
    310       const size_t minEventSize = CEventClient::headerSize + getIdServer().size() + 10 * sizeof(int); 
     310     const size_t minEventSize = CEventClient::headerSize + getIdServer().size() + 10 * sizeof(int); 
    311311 
    312312      // Ensure there is at least some room for 20 of such events in the buffers 
     
    14821482                                                           CContextClient* contextClient, bool bufferForWriting /*= "false"*/) 
    14831483   { 
    1484      std::map<int, StdSize> attributesSize; 
     1484         // As calendar attributes are sent even if there are no active files or fields, maps are initialized according the size of calendar attributes 
     1485     std::map<int, StdSize> attributesSize = CCalendarWrapper::get(CCalendarWrapper::GetDefName())->getMinimumBufferSizeForAttributes(contextClient); 
     1486     maxEventSize = CCalendarWrapper::get(CCalendarWrapper::GetDefName())->getMinimumBufferSizeForAttributes(contextClient); 
    14851487 
    14861488     std::vector<CFile*>& fileList = this->enabledFiles; 
Note: See TracChangeset for help on using the changeset viewer.