MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / maxIndexPointers

Method maxIndexPointers

source/core/StarBTreeDatabase.cpp:980–984  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

978}
979
980uint32_t BTreeDatabase::maxIndexPointers() const {
981 // 2 for magic, 1 byte for level, sizeof(BlockIndex) for beginPointer, 4
982 // for size.
983 return (m_blockSize - 2 - 1 - sizeof(BlockIndex) - 4) / (m_keySize + sizeof(BlockIndex)) + 1;
984}
985
986uint32_t BTreeDatabase::dataSize(ByteArray const& d) const {
987 return vlqUSize(d.size()) + d.size();

Callers 3

indexNeedsShiftMethod · 0.80
indexShiftMethod · 0.80
indexSplitMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected