summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/sanitizer_common/sanitizer_ring_buffer.h
diff options
context:
space:
mode:
authorKostya Serebryany <kcc@google.com>2018-09-06 22:08:41 +0000
committerKostya Serebryany <kcc@google.com>2018-09-06 22:08:41 +0000
commit950a1a393675c806e24f803a33e6ece7652c4160 (patch)
treebe62dc740416ab8c1a9b8ecc2a55583c2be760c9 /compiler-rt/lib/sanitizer_common/sanitizer_ring_buffer.h
parent94d44c97bcffbf157b05a45c2f0e56302db9a03c (diff)
downloadbcm5719-llvm-950a1a393675c806e24f803a33e6ece7652c4160.tar.gz
bcm5719-llvm-950a1a393675c806e24f803a33e6ece7652c4160.zip
[hwasan] introduce __hwasan_print_memory_usage
llvm-svn: 341592
Diffstat (limited to 'compiler-rt/lib/sanitizer_common/sanitizer_ring_buffer.h')
-rw-r--r--compiler-rt/lib/sanitizer_common/sanitizer_ring_buffer.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_ring_buffer.h b/compiler-rt/lib/sanitizer_common/sanitizer_ring_buffer.h
index 32f0d3fff7a..c4649c2be9f 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_ring_buffer.h
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_ring_buffer.h
@@ -39,6 +39,10 @@ class RingBuffer {
2 * sizeof(T *));
}
+ static uptr SizeInBytes(uptr Size) {
+ return Size * sizeof(T) + 2 * sizeof(T*);
+ }
+
uptr SizeInBytes() { return SizeInBytes(size()); }
void push(T t) {
@@ -62,10 +66,6 @@ class RingBuffer {
~RingBuffer() {}
RingBuffer(const RingBuffer&) = delete;
- static uptr SizeInBytes(uptr Size) {
- return Size * sizeof(T) + 2 * sizeof(T*);
- }
-
// Data layout:
// LNDDDDDDDD
// D: data elements.
OpenPOWER on IntegriCloud