[scudo][standalone] Add more stats to mallinfo
Summary: Android requires additional stats in mallinfo. While we can provide right away the number of bytes mapped (Primary+Secondary), there was no way to get the number of free bytes (only makes sense for the Primary since the Secondary unmaps everything on deallocation). An approximation could be `StatMapped - StatAllocated`, but since we are mapping in `1<<17` increments for the 64-bit Primary, it's fairly inaccurate. So we introduce `StatFree` (note it's `Free`, not `Freed`!), which keeps track of the amount of Primary blocks currently unallocated. Reviewers: cferris, eugenis, vitalybuka, hctim, morehouse Reviewed By: morehouse Subscribers: delcypher, #sanitizers, llvm-commits Tags: #llvm, #sanitizers Differential Revision: https://reviews.llvm.org/D66112 llvm-svn: 368866
Loading
Please register or sign in to comment