Lines Matching refs:byte_count

185 bool MemMap::CheckMapRequest(uint8_t* expected_ptr, void* actual_ptr, size_t byte_count,  in CheckMapRequest()  argument
202 int result = TargetMUnmap(actual_ptr, byte_count); in CheckMapRequest()
204 PLOG(WARNING) << StringPrintf("munmap(%p, %zd) failed", actual_ptr, byte_count); in CheckMapRequest()
231 size_t byte_count, in CheckReservation() argument
247 if (byte_count > reservation.Size()) { in CheckReservation()
249 byte_count, in CheckReservation()
306 size_t byte_count, in MapAnonymous() argument
316 if (byte_count == 0) { in MapAnonymous()
320 size_t page_aligned_byte_count = RoundUp(byte_count, kPageSize); in MapAnonymous()
329 DCHECK(ContainedWithinExistingMap(addr, byte_count, error_msg)) << *error_msg; in MapAnonymous()
333 if (!CheckReservation(addr, byte_count, name, *reservation, error_msg)) { in MapAnonymous()
381 reservation->ReleaseReservedMemory(byte_count); in MapAnonymous()
385 byte_count, in MapAnonymous()
392 MemMap MemMap::MapPlaceholder(const char* name, uint8_t* addr, size_t byte_count) { in MapPlaceholder() argument
393 if (byte_count == 0) { in MapPlaceholder()
396 const size_t page_aligned_byte_count = RoundUp(byte_count, kPageSize); in MapPlaceholder()
397 return MemMap(name, addr, byte_count, addr, page_aligned_byte_count, 0, /* reuse= */ true); in MapPlaceholder()
482 size_t byte_count, in MapFileAtAddress() argument
503 DCHECK(ContainedWithinExistingMap(expected_ptr, byte_count, error_msg)) in MapFileAtAddress()
508 if (!CheckReservation(expected_ptr, byte_count, filename, *reservation, error_msg)) { in MapFileAtAddress()
518 if (byte_count == 0) { in MapFileAtAddress()
526 size_t page_aligned_byte_count = RoundUp(byte_count + page_offset, kPageSize); in MapFileAtAddress()
566 const uint8_t *real_end = actual + page_offset + byte_count; in MapFileAtAddress()
577 reservation->ReleaseReservedMemory(byte_count); in MapFileAtAddress()
581 byte_count, in MapFileAtAddress()
780 MemMap MemMap::TakeReservedMemory(size_t byte_count) { in TakeReservedMemory() argument
782 ReleaseReservedMemory(byte_count); // Performs necessary DCHECK()s on this reservation. in TakeReservedMemory()
783 size_t base_size = RoundUp(byte_count, kPageSize); in TakeReservedMemory()
784 return MemMap(name_, begin, byte_count, begin, base_size, prot_, /* reuse= */ false); in TakeReservedMemory()
787 void MemMap::ReleaseReservedMemory(size_t byte_count) { in ReleaseReservedMemory() argument
799 DCHECK_NE(byte_count, 0u); in ReleaseReservedMemory()
800 DCHECK_LE(byte_count, size_); in ReleaseReservedMemory()
801 byte_count = RoundUp(byte_count, kPageSize); in ReleaseReservedMemory()
803 if (byte_count == size_) { in ReleaseReservedMemory()
810 begin_ += byte_count; in ReleaseReservedMemory()
811 size_ -= byte_count; in ReleaseReservedMemory()