A buffer frame holds on-disk page bytes in uint8_t* page_dat…
A buffer frame holds on-disk page bytes in uint8_t* page_data. Byte 0 stores a type tag: 0 = INNER, 1 = LEAF. The raw bytes are just a serialized layout; no C++ constructors have run. We are comparing two different approaches to access the page: Approach A: // Assume caller already “knows” it is a leaf page. auto *nodeAny = reinterpret_cast(page_data); auto *leafNode = reinterpret_cast(nodeAny); // Immediately call virtual method: int count = leafNode->num_keys(); //
Read Details