Lines Matching refs:uptr
36 const uptr kWordSize = SANITIZER_WORDSIZE / 8;
37 const uptr kWordSizeInBits = 8 * kWordSize;
40 const uptr kCacheLineSize = 128;
42 const uptr kCacheLineSize = 64;
45 const uptr kMaxPathLength = 4096;
47 const uptr kMaxThreadStackSize = 1 << 30; // 1Gb
49 static const uptr kErrorMessageBufferSize = 1 << 16;
65 uptr GetPageSize();
66 extern uptr PageSizeCached;
67 INLINE uptr GetPageSizeCached() { in GetPageSizeCached()
72 uptr GetMmapGranularity();
73 uptr GetMaxVirtualAddress();
75 uptr GetTid();
76 uptr GetThreadSelf();
77 void GetThreadStackTopAndBottom(bool at_initialization, uptr *stack_top,
78 uptr *stack_bottom);
79 void GetThreadStackAndTls(bool main, uptr *stk_addr, uptr *stk_size,
80 uptr *tls_addr, uptr *tls_size);
83 void *MmapOrDie(uptr size, const char *mem_type, bool raw_report = false);
84 INLINE void *MmapOrDieQuietly(uptr size, const char *mem_type) { in MmapOrDieQuietly()
87 void UnmapOrDie(void *addr, uptr size);
88 void *MmapFixedNoReserve(uptr fixed_addr, uptr size,
90 void *MmapNoReserveOrDie(uptr size, const char *mem_type);
91 void *MmapFixedOrDie(uptr fixed_addr, uptr size);
92 void *MmapFixedNoAccess(uptr fixed_addr, uptr size, const char *name = nullptr);
93 void *MmapNoAccess(uptr size);
95 void *MmapAlignedOrDie(uptr size, uptr alignment, const char *mem_type);
98 bool MprotectNoAccess(uptr addr, uptr size);
99 bool MprotectReadOnly(uptr addr, uptr size);
102 bool MemoryRangeIsAvailable(uptr range_start, uptr range_end);
103 void FlushUnneededShadowMemory(uptr addr, uptr size);
104 void IncreaseTotalMmap(uptr size);
105 void DecreaseTotalMmap(uptr size);
106 uptr GetRSS();
107 void NoHugePagesInRegion(uptr addr, uptr length);
108 void DontDumpShadowMemory(uptr addr, uptr length);
111 void RunMallocHooks(const void *ptr, uptr size);
121 explicit InternalScopedBuffer(uptr cnt) { in InternalScopedBuffer()
128 T &operator[](uptr i) { return ptr_[i]; }
130 uptr size() { return cnt_ * sizeof(T); } in size()
134 uptr cnt_;
142 explicit InternalScopedString(uptr max_length) in InternalScopedString()
146 uptr length() { return length_; } in length()
154 uptr length_;
163 void *Allocate(uptr size);
168 typedef void (*LowLevelAllocateCallback)(uptr ptr, uptr size);
182 if ((uptr)Verbosity() >= (level)) Report(__VA_ARGS__); \
186 if ((uptr)Verbosity() >= (level)) Printf(__VA_ARGS__); \
193 void Write(const char *buffer, uptr length);
211 uptr fd_pid;
218 extern uptr stoptheworld_tracer_pid;
219 extern uptr stoptheworld_tracer_ppid;
233 bool ReadFromFile(fd_t fd, void *buff, uptr buff_size,
234 uptr *bytes_read = nullptr, error_t *error_p = nullptr);
235 bool WriteToFile(fd_t fd, const void *buff, uptr buff_size,
236 uptr *bytes_written = nullptr, error_t *error_p = nullptr);
255 bool ReadFileToBuffer(const char *file_name, char **buff, uptr *buff_size,
256 uptr *read_len, uptr max_len = 1 << 26,
261 void *MapFileToMemory(const char *file_name, uptr *buff_size);
262 void *MapWritableFileToMemory(void *addr, uptr size, fd_t fd, OFF_T offset);
264 bool IsAccessibleMemoryRange(uptr beg, uptr size);
273 uptr ReadBinaryName(/*out*/char *buf, uptr buf_len);
274 uptr ReadBinaryNameCached(/*out*/char *buf, uptr buf_len);
275 uptr ReadLongProcessName(/*out*/ char *buf, uptr buf_len);
308 uptr GetStackSizeLimitInBytes();
309 void SetStackSizeLimitInBytes(uptr limit);
325 uptr GetTlsSize();
332 void SortArray(uptr *array, uptr size);
340 void NORETURN ReportMmapFailureAndDie(uptr size, const char *mem_type,
406 INLINE uptr MostSignificantSetBitIndex(uptr x) { in MostSignificantSetBitIndex()
423 INLINE uptr LeastSignificantSetBitIndex(uptr x) { in LeastSignificantSetBitIndex()
440 INLINE bool IsPowerOfTwo(uptr x) { in IsPowerOfTwo()
444 INLINE uptr RoundUpToPowerOfTwo(uptr size) { in RoundUpToPowerOfTwo()
448 uptr up = MostSignificantSetBitIndex(size); in RoundUpToPowerOfTwo()
454 INLINE uptr RoundUpTo(uptr size, uptr boundary) { in RoundUpTo()
459 INLINE uptr RoundDownTo(uptr x, uptr boundary) { in RoundDownTo()
463 INLINE bool IsAligned(uptr a, uptr alignment) { in IsAligned()
467 INLINE uptr Log2(uptr x) { in Log2()
500 void Initialize(uptr initial_capacity) { in Initialize()
501 capacity_ = Max(initial_capacity, (uptr)1); in Initialize()
508 T &operator[](uptr i) {
512 const T &operator[](uptr i) const {
519 uptr new_capacity = RoundUpToPowerOfTwo(size_ + 1); in push_back()
532 uptr size() const { in size()
541 uptr capacity() const { in capacity()
562 void Resize(uptr new_capacity) { in Resize()
575 uptr capacity_;
576 uptr size_;
582 explicit InternalMmapVector(uptr initial_capacity) { in InternalMmapVector()
593 void InternalSort(Container *v, uptr size, Compare comp) { in InternalSort()
597 for (uptr i = 1; i < size; i++) { in InternalSort()
598 uptr j, p; in InternalSort()
609 for (uptr i = size - 1; i > 0; i--) { in InternalSort()
611 uptr j, max_ind; in InternalSort()
613 uptr left = 2 * j + 1; in InternalSort()
614 uptr right = 2 * j + 2; in InternalSort()
629 uptr InternalBinarySearch(const Container &v, uptr first, uptr last, in InternalBinarySearch()
631 uptr not_found = last + 1; in InternalBinarySearch()
633 uptr mid = (first + last) / 2; in InternalBinarySearch()
649 void set(const char *module_name, uptr base_address);
651 void addAddressRange(uptr beg, uptr end, bool executable);
652 bool containsAddress(uptr address) const;
655 uptr base_address() const { return base_address_; } in base_address()
659 uptr beg;
660 uptr end;
663 AddressRange(uptr beg, uptr end, bool executable) in AddressRange()
671 uptr base_address_;
686 uptr size() const { return modules_.size(); } in size()
687 const LoadedModule &operator[](uptr i) const {
700 static const uptr kInitialCapacity = 1 << 14;
704 typedef void (*RangeIteratorCallback)(uptr begin, uptr end, void *arg);
745 INLINE uptr GetPthreadDestructorIterations() { in GetPthreadDestructorIterations()
774 uptr addr;
775 uptr pc;
776 uptr sp;
777 uptr bp;
782 SignalContext(void *context, uptr addr, uptr pc, uptr sp, uptr bp, in SignalContext()
799 void GetPcSpBp(void *context, uptr *pc, uptr *sp, uptr *bp);
838 uptr n_uniq_ids;
839 uptr allocated;