SP: use CapPtr<>s in address_space, largealloc

This commit is contained in:
Nathaniel Filardo
2021-03-23 14:56:24 +00:00
committed by Nathaniel Wesley Filardo
parent 005f5787ef
commit d9ee19a16c
7 changed files with 78 additions and 59 deletions

View File

@@ -40,7 +40,7 @@ int main()
// For 1MiB superslabs, SUPERSLAB_BITS + 4 is not big enough for the example.
size_t large_class = 28 - SUPERSLAB_BITS;
size_t size = bits::one_at_bit(SUPERSLAB_BITS + large_class);
void* oe_base = mp.reserve<true>(large_class);
void* oe_base = mp.reserve<true>(large_class).unsafe_capptr;
void* oe_end = (uint8_t*)oe_base + size;
PALOpenEnclave::setup_initial_range(oe_base, oe_end);
std::cout << "Allocated region " << oe_base << " - " << oe_end << std::endl;