Accessing the root pages (unsafely, of course)
[?]
Jun 2, 2021, 8:42 AM
TJ2R4HAZ23H3NW7CJSBXLLXUNPLK25XX33CLOL74NWO32JCG4UZQCDependencies
- [2]
2ZRCQBXPVersion bump - [3]
YXKP4AIWNew file locks, with multiple sets of free pages - [4]
PRDUE4YACleanup + published on crates.io - [5]
OHUZ73MKVersions - [6]
E4MD6T3LProofreading and commenting of this crate (massive bug fixes included) - [7]
M6PHQUGLfallocate only when necessary - [8]
DASFQGORDebugging - [9]
OP6SVMODResetting history - [10]
5LSYTRQ6More docs, example, and fixing the free page diagnostic function for mutable transactions - [11]
WTXLZDYIFixing bus errors on a full disk - [*]
OFINGD26implementing prev() on cursors (+ some cleanup)
Change contents
- edit in sanakirja/src/environment/muttxn.rs at line 568
/// The root page of this transaction (use with caution, this page/// contains root databases).pub unsafe fn root_page_mut(&mut self) -> &mut [u8; 4064] {let env = self.env.borrow();let maps = env.mmaps.lock();let ptr = maps[0].ptr.add(self.root * PAGE_SIZE + GLOBAL_HEADER_SIZE);&mut *(ptr as *mut [u8; 4064])}/// The root page of this transaction.pub unsafe fn root_page(&mut self) -> &[u8; 4064] {let env = self.env.borrow();let maps = env.mmaps.lock();let ptr = maps[0].ptr.add(self.root * PAGE_SIZE + GLOBAL_HEADER_SIZE);&*(ptr as *const [u8; 4064])} - edit in sanakirja/src/environment/mod.rs at line 606[13.18035][13.18035]
}/// The root page of this transaction.pub unsafe fn root_page(&mut self) -> &[u8; 4064] {let env = self.env.borrow();let maps = env.mmaps.lock();let ptr = maps[0].ptr.add(self.root * PAGE_SIZE + GLOBAL_HEADER_SIZE);&*(ptr as *const [u8; 4064]) - replacement in sanakirja/Cargo.toml at line 3
version = "1.2.0"version = "1.2.1" - replacement in sanakirja/Cargo.toml at line 29
sanakirja-core = { path = "../sanakirja-core", version = "1.2.0" }sanakirja-core = { path = "../sanakirja-core", version = "1.2.8" }