diff options
author | Mitch Phillips <31459023+hctim@users.noreply.github.com> | 2021-02-08 10:46:45 -0800 |
---|---|---|
committer | Mitch Phillips <mitchp@google.com> | 2021-02-10 10:36:35 -0800 |
commit | 764c80dc5d5401d01aab1cf78ad63fa3b5feb1fc (patch) | |
tree | 3572894a2c2f5e9df3331204b23ece59d9a29af5 /gwp_asan/common.h | |
parent | ef4019d341edd1f7f588951c0164965fb7bd2f5a (diff) | |
download | gwp_asan-764c80dc5d5401d01aab1cf78ad63fa3b5feb1fc.tar.gz |
[GWP-ASan] Add aligned allocations.
Adds a new allocation API to GWP-ASan that handles size+alignment
restrictions.
Reviewed By: cryptoad, eugenis
Differential Revision: https://reviews.llvm.org/D94830
GitOrigin-RevId: 3d8823b8e48a3f064b1e2dd52881b3ac581f6f2b
Change-Id: I22a75b85889825c2dec23f96282912946ffd810b
Diffstat (limited to 'gwp_asan/common.h')
-rw-r--r-- | gwp_asan/common.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gwp_asan/common.h b/gwp_asan/common.h index d197711..ee8f9d1 100644 --- a/gwp_asan/common.h +++ b/gwp_asan/common.h @@ -49,7 +49,7 @@ struct AllocationMetadata { static constexpr size_t kMaxTraceLengthToCollect = 128; // Records the given allocation metadata into this struct. - void RecordAllocation(uintptr_t Addr, size_t Size); + void RecordAllocation(uintptr_t Addr, size_t RequestedSize); // Record that this allocation is now deallocated. void RecordDeallocation(); @@ -70,7 +70,7 @@ struct AllocationMetadata { // valid, as the allocation has never occurred. uintptr_t Addr = 0; // Represents the actual size of the allocation. - size_t Size = 0; + size_t RequestedSize = 0; CallSiteInfo AllocationTrace; CallSiteInfo DeallocationTrace; |