Lines Matching refs:byte_count
198 static bool CheckMapRequest(uint8_t* expected_ptr, void* actual_ptr, size_t byte_count,
209 uintptr_t limit = expected + byte_count;
216 int result = munmap(actual_ptr, byte_count);
218 PLOG(WARNING) << StringPrintf("munmap(%p, %zd) failed", actual_ptr, byte_count);
259 MemMap* MemMap::MapAnonymous(const char* name, uint8_t* expected_ptr, size_t byte_count, int prot,
264 if (byte_count == 0) {
267 size_t page_aligned_byte_count = RoundUp(byte_count, kPageSize);
275 DCHECK(ContainedWithinExistingMap(expected_ptr, byte_count, error_msg)) << *error_msg;
438 return new MemMap(name, reinterpret_cast<uint8_t*>(actual), byte_count, actual,
442 MemMap* MemMap::MapDummy(const char* name, uint8_t* addr, size_t byte_count) {
443 if (byte_count == 0) {
446 const size_t page_aligned_byte_count = RoundUp(byte_count, kPageSize);
447 return new MemMap(name, addr, byte_count, addr, page_aligned_byte_count, 0, true /* reuse */);
450 MemMap* MemMap::MapFileAtAddress(uint8_t* expected_ptr, size_t byte_count, int prot, int flags,
463 DCHECK(ContainedWithinExistingMap(expected_ptr, byte_count, error_msg)) << *error_msg;
471 if (byte_count == 0) {
477 // Adjust 'byte_count' to be page-aligned as we will map this anyway.
478 size_t page_aligned_byte_count = RoundUp(byte_count + page_offset, kPageSize);
506 return new MemMap(filename, actual + page_offset, byte_count, actual, page_aligned_byte_count,