Skip to content

Add lifetime to PAddr and VAddr #142

Open
@nuta

Description

@nuta

In #141, I noticed that we need to track the lifetime of a PAddr object which references to OwnedPages. It's problematic because it lead to memory leaks or nasty use-after-free bugs. In this issue, I'll replace PAddr and VAddr as:

#[repr(transparent)]
pub struct PAddr<'a> {
    value: usize,
    _pd: PhantomData<&'a ()>,
}

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions