Lines Matching refs:beg
37 void ReportMapRange(const char *descr, uptr beg, uptr size) { in ReportMapRange() argument
39 uptr end = beg + size - 1; in ReportMapRange()
40 VPrintf(1, "%s : 0x%zx - 0x%zx\n", descr, beg, end); in ReportMapRange()
44 static bool CheckMemoryRangeAvailability(uptr beg, uptr size) { in CheckMemoryRangeAvailability() argument
46 uptr end = beg + size - 1; in CheckMemoryRangeAvailability()
47 if (!MemoryRangeIsAvailable(beg, end)) { in CheckMemoryRangeAvailability()
48 Printf("FATAL: Memory range 0x%zx - 0x%zx is not available.\n", beg, end); in CheckMemoryRangeAvailability()
55 static bool ProtectMemoryRange(uptr beg, uptr size, const char *name) { in ProtectMemoryRange() argument
57 void *addr = MmapFixedNoAccess(beg, size, name); in ProtectMemoryRange()
58 if (beg == 0 && addr) { in ProtectMemoryRange()
62 beg += gap; in ProtectMemoryRange()
64 addr = MmapFixedNoAccess(beg, size, name); in ProtectMemoryRange()
66 if ((uptr)addr != beg) { in ProtectMemoryRange()
67 uptr end = beg + size - 1; in ProtectMemoryRange()
68 Printf("FATAL: Cannot protect memory range 0x%zx - 0x%zx (%s).\n", beg, in ProtectMemoryRange()