Lines Matching refs:Reservation
295 /*reservation=*/ nullptr,
354 /*reservation=*/ nullptr,
405 // `reuse == true` or `reservation != nullptr` is weird. We should either drop support
421 /*reservation=*/ nullptr,
442 /*reservation=*/ nullptr,
527 /*reservation=*/ nullptr,
550 /*reservation=*/ nullptr,
567 /*reservation=*/ nullptr,
582 /*reservation=*/ nullptr,
605 /*reservation=*/ nullptr,
616 MemMap reservation = MemMap::MapAnonymous("MapAnonymous0",
621 ASSERT_TRUE(reservation.IsValid()) << error_msg;
624 uint8_t* map_base = reinterpret_cast<uint8_t*>(reservation.BaseBegin());
626 // Map at the same address, taking from the `map` reservation.
631 &reservation,
640 &reservation,
649 &reservation,
654 ASSERT_FALSE(reservation.IsValid()); // The entire reservation was used.
776 TEST_F(MemMapTest, Reservation) {
784 MemMap reservation = MemMap::MapAnonymous("Test reservation",
789 ASSERT_TRUE(reservation.IsValid());
792 // Map first part of the reservation.
794 static_assert(kChunk1Size < kMapSize, "We want to split the reservation.");
795 uint8_t* addr1 = reservation.Begin();
805 &reservation,
811 ASSERT_TRUE(reservation.IsValid());
812 // Entire pages are taken from the `reservation`.
814 ASSERT_EQ(map1.BaseEnd(), reservation.Begin());
818 DCHECK_LT(kChunk2Size, reservation.Size()); // We want to split the reservation.
819 uint8_t* addr2 = reservation.Begin();
826 &reservation,
833 ASSERT_EQ(map2.BaseEnd(), reservation.Begin());
835 // Map the rest of the reservation except the last byte.
836 const size_t kChunk3Size = reservation.Size() - 1u;
837 uint8_t* addr3 = reservation.Begin();
847 &reservation,
853 // Entire pages are taken from the `reservation`, so it's now exhausted.
854 ASSERT_FALSE(reservation.IsValid());
858 DCHECK_LT(kChunk2ASize, map2.Size()); // We want to split the reservation.
868 // And take the rest of the middle reservation.