Skip to content

Commit 3240cb2

Browse files
committed
!fixup Size -> GetSize()
1 parent 5688643 commit 3240cb2

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

compiler-rt/lib/sanitizer_common/sanitizer_allocator_dlsym.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,19 +36,19 @@ struct DlSymAllocator {
3636
static void *Allocate(uptr size_in_bytes, uptr align = kWordSize) {
3737
void *ptr = InternalAlloc(size_in_bytes, nullptr, align);
3838
CHECK(internal_allocator()->FromPrimary(ptr));
39-
Details::OnAllocate(ptr, Size(ptr));
39+
Details::OnAllocate(ptr, GetSize(ptr));
4040
return ptr;
4141
}
4242

4343
static void *Callocate(usize nmemb, usize size) {
4444
void *ptr = InternalCalloc(nmemb, size);
4545
CHECK(internal_allocator()->FromPrimary(ptr));
46-
Details::OnAllocate(ptr, Size(ptr));
46+
Details::OnAllocate(ptr, GetSize(ptr));
4747
return ptr;
4848
}
4949

5050
static void Free(void *ptr) {
51-
uptr size = Size(ptr);
51+
uptr size = GetSize(ptr);
5252
Details::OnFree(ptr, size);
5353
InternalFree(ptr);
5454
}
@@ -61,7 +61,7 @@ struct DlSymAllocator {
6161
Free(ptr);
6262
return nullptr;
6363
}
64-
uptr size = Size(ptr);
64+
uptr size = GetSize(ptr);
6565
uptr memcpy_size = Min(new_size, size);
6666
void *new_ptr = Allocate(new_size);
6767
if (new_ptr)
@@ -75,7 +75,7 @@ struct DlSymAllocator {
7575
return Realloc(ptr, count * size);
7676
}
7777

78-
static uptr Size(void *ptr) {
78+
static uptr GetSize(void *ptr) {
7979
return internal_allocator()->GetActuallyAllocatedSize(ptr);
8080
}
8181

compiler-rt/lib/tysan/tysan_interceptors.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ INTERCEPTOR(void *, malloc, uptr size) {
111111
#if SANITIZER_APPLE
112112
INTERCEPTOR(uptr, malloc_size, void *ptr) {
113113
if (DlsymAlloc::PointerIsMine(ptr))
114-
return DlsymAlloc::Size(ptr);
114+
return DlsymAlloc::GetSize(ptr);
115115
return REAL(malloc_size)(ptr);
116116
}
117117
#endif

0 commit comments

Comments
 (0)