OmniSciDB  a5dc49c757
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Data_Namespace::anonymous_namespace{DataMgr.cpp} Namespace Reference

Classes

struct  BuddyinfoBlocks
 

Typedefs

template<typename T , std::size_t N>
using small_vector = boost::container::small_vector< T, N >
 

Functions

size_t get_slab_size (size_t initial_slab_size, size_t buffer_pool_size, size_t page_size)
 
small_vector< std::string_view,
kMaxBuddyinfoTokens
tokenize (std::string_view const str)
 

Variables

static DataMgrg_data_mgr_ptr = nullptr
 
static bool at_exit_called = false
 
constexpr unsigned kMaxBuddyinfoBlocks = 32
 
constexpr unsigned kMaxBuddyinfoTokens = kMaxBuddyinfoBlocks + 4
 
constexpr double kErrorCodeUnableToOpenFile = -1.0
 
constexpr double kErrorCodeOutOfMemory = -2.0
 

Typedef Documentation

template<typename T , std::size_t N>
using Data_Namespace::anonymous_namespace{DataMgr.cpp}::small_vector = typedef boost::container::small_vector<T, N>

Definition at line 772 of file DataMgr.cpp.

Function Documentation

size_t Data_Namespace::anonymous_namespace{DataMgr.cpp}::get_slab_size ( size_t  initial_slab_size,
size_t  buffer_pool_size,
size_t  page_size 
)

Definition at line 264 of file DataMgr.cpp.

Referenced by Data_Namespace::DataMgr::populateMgrs().

266  {
267  auto slab_size = std::min(initial_slab_size, buffer_pool_size);
268  slab_size = (slab_size / page_size) * page_size;
269  return slab_size;
270 }

+ Here is the caller graph for this function:

small_vector<std::string_view, kMaxBuddyinfoTokens> Data_Namespace::anonymous_namespace{DataMgr.cpp}::tokenize ( std::string_view const  str)

Definition at line 824 of file DataMgr.cpp.

Referenced by Data_Namespace::ProcBuddyinfoParser::parseBuddyinfo().

824  {
825  small_vector<std::string_view, kMaxBuddyinfoTokens> tokens;
826  size_t start = 0;
827  while (start < str.size()) {
828  // Find the start of the next token
829  start = str.find_first_not_of(' ', start);
830  // Check if we're at the end
831  if (start == std::string_view::npos) {
832  break;
833  }
834  // Find the end of the token. std::string_view::npos is ok.
835  size_t end = str.find(' ', start);
836  tokens.push_back(str.substr(start, end - start)); // Add the token to our list
837  start = end; // Set up for the next token
838  }
839  return tokens;
840 }

+ Here is the caller graph for this function:

Variable Documentation

bool Data_Namespace::anonymous_namespace{DataMgr.cpp}::at_exit_called = false
static
DataMgr* Data_Namespace::anonymous_namespace{DataMgr.cpp}::g_data_mgr_ptr = nullptr
static
constexpr double Data_Namespace::anonymous_namespace{DataMgr.cpp}::kErrorCodeOutOfMemory = -2.0
constexpr double Data_Namespace::anonymous_namespace{DataMgr.cpp}::kErrorCodeUnableToOpenFile = -1.0

Definition at line 769 of file DataMgr.cpp.

Referenced by Data_Namespace::ProcBuddyinfoParser::parseBuddyinfo().

constexpr unsigned Data_Namespace::anonymous_namespace{DataMgr.cpp}::kMaxBuddyinfoBlocks = 32

Definition at line 767 of file DataMgr.cpp.

constexpr unsigned Data_Namespace::anonymous_namespace{DataMgr.cpp}::kMaxBuddyinfoTokens = kMaxBuddyinfoBlocks + 4

Definition at line 768 of file DataMgr.cpp.