pub struct LocalHeap { /* private fields */ }Expand description
Parsed local heap header.
Local heaps store small strings (link names) for v1 groups. Symbol table entries reference strings by byte offset into the heap’s data segment.
Binary layout (signature “HEAP”):
- Signature (4 bytes): “HEAP”
- Version (1 byte): 0
- Reserved (3 bytes)
- Data Segment Size (L bytes)
- Offset to Head of Free-list (L bytes)
- Address of Data Segment (O bytes)
Implementations§
Source§impl LocalHeap
impl LocalHeap
Sourcepub async fn read(
reader: &Arc<dyn AsyncFileReader>,
address: u64,
size_of_offsets: u8,
size_of_lengths: u8,
) -> Result<Self>
pub async fn read( reader: &Arc<dyn AsyncFileReader>, address: u64, size_of_offsets: u8, size_of_lengths: u8, ) -> Result<Self>
Parse the local heap header and fetch the data segment.
Sourcepub fn get_string(&self, offset: u64) -> Result<String>
pub fn get_string(&self, offset: u64) -> Result<String>
Read a null-terminated string at the given offset in the data segment.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for LocalHeap
impl RefUnwindSafe for LocalHeap
impl Send for LocalHeap
impl Sync for LocalHeap
impl Unpin for LocalHeap
impl UnsafeUnpin for LocalHeap
impl UnwindSafe for LocalHeap
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more