[Mammoth] Add the ability to duplicate an owned memory region.

This commit is contained in:
Drew Galbraith 2024-01-11 18:29:45 -08:00
parent be392252a4
commit e7cc98a20c
2 changed files with 5 additions and 0 deletions

View file

@ -30,6 +30,7 @@ class OwnedMemoryRegion {
z_cap_t cap() const { return vmmo_cap_; }
z_cap_t DuplicateCap();
OwnedMemoryRegion Duplicate();
bool empty() const { return vmmo_cap_ == 0; }
explicit operator bool() const { return vmmo_cap_ != 0; }