diff options
Diffstat (limited to 'compiler-rt/lib/sanitizer_common/sanitizer_procmaps.h')
| -rw-r--r-- | compiler-rt/lib/sanitizer_common/sanitizer_procmaps.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_procmaps.h b/compiler-rt/lib/sanitizer_common/sanitizer_procmaps.h index b96f09ec456..ed281997f1a 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_procmaps.h +++ b/compiler-rt/lib/sanitizer_common/sanitizer_procmaps.h @@ -32,7 +32,7 @@ class MemoryMappingLayout { } }; -#else // _WIN32 +#else // SANITIZER_WINDOWS #if SANITIZER_LINUX struct ProcSelfMapsBuff { char *data; @@ -118,7 +118,15 @@ class MemoryMappingLayout { # endif }; -#endif // _WIN32 +typedef void (*fill_profile_f)(uptr start, uptr rss, bool file, + /*out*/uptr *stats, uptr stats_size); + +// Parse the contents of /proc/self/smaps and generate a memory profile. +// |cb| is a tool-specific callback that fills the |stats| array containing +// |stats_size| elements. +void GetMemoryProfile(fill_profile_f cb, uptr *stats, uptr stats_size); + +#endif // SANITIZER_WINDOWS } // namespace __sanitizer |

