unsafe { &mut *(&mut self.ptr as *mut u64 as *mut Obj) }
Please correct me if I am wrong, in the above code, we do not care about what self.ptr is pointing to. We are taking the address of self.ptr
(which also happens to be the last field of a struct in a mmaped region of memory), and interpreting it as the start of an struct Obj
?
Context: reading some database code.