FACT++  1.0
bool MemoryManager::setChunkSize ( const size_t  size)
inline

Definition at line 145 of file MemoryManager.h.

References size.

146  {
147 #ifdef __EXCEPTIONS
148  if (getInUse())
149  throw std::runtime_error("Cannot change the chunk size while there is memory in use");
150  if (getMaxMemory()<size)
151  throw std::runtime_error("Chunk size ("+std::to_string((long long int)size)+") larger than allowed memory ("+std::to_string((long long int)getMaxMemory())+")");
152 #else
153  if (getInUse() || getMaxMemory()<size)
154  return false;
155 #endif
156 
157  fMemoryStock->fChunkSize = size;
158  return true;
159  }
std::shared_ptr< MemoryStock > fMemoryStock
size_t getInUse() const
size_t getMaxMemory() const
int size
Definition: db_dim_server.c:17