Closed 00xc closed 9 months ago
Introduce VirtAddr::aligned_{ref,mut} helpers to help transform a VirtAddr into a &T / &mut T while checking that the address is non-NULL and properly aligned to T's requirements.
VirtAddr::aligned_{ref,mut}
VirtAddr
&T
&mut T
T
Also, add alignment check I missed in #226.
Introduce
VirtAddr::aligned_{ref,mut}
helpers to help transform aVirtAddr
into a&T
/&mut T
while checking that the address is non-NULL and properly aligned toT
's requirements.Also, add alignment check I missed in #226.