diff options
| author | Kostya Kortchinsky <kostyak@google.com> | 2017-04-20 15:11:00 +0000 |
|---|---|---|
| committer | Kostya Kortchinsky <kostyak@google.com> | 2017-04-20 15:11:00 +0000 |
| commit | 006805d146727b6651ae462211ad2c4bba8e72fe (patch) | |
| tree | e5f61d85a299e1fdc528402d7a891a8148a99807 /llvm/lib/Support/Process.cpp | |
| parent | 04e7c08d9ecef2815a14d1e5c90898be16fcd587 (diff) | |
| download | bcm5719-llvm-006805d146727b6651ae462211ad2c4bba8e72fe.tar.gz bcm5719-llvm-006805d146727b6651ae462211ad2c4bba8e72fe.zip | |
[scudo] Minor changes and refactoring
Summary:
This is part of D31947 that is being split into several smaller changes.
This one deals with all the minor changes, more specifically:
- Rename some variables and functions to make their purpose clearer;
- Reorder some code;
- Mark the hot termination incurring checks as `UNLIKELY`; if they happen, the
program will die anyway;
- Add a `getScudoChunk` method;
- Add an `eraseHeader` method to ScudoChunk that will clear a header with 0s;
- Add a parameter to `allocate` to know if the allocated chunk should be filled
with zeros. This allows `calloc` to not have to call
`GetActuallyAllocatedSize`; more changes to get rid of this function on the
hot paths will follow;
- reallocate was missing a check to verify that the pointer is properly
aligned on `MinAlignment`;
- The `Stats` in the secondary have to be protected by a mutex as the `Add`
and `Sub` methods are actually not atomic;
- The software CRC32 function was moved to the header to allow for inlining.
Reviewers: dvyukov, alekseyshl, kcc
Reviewed By: dvyukov
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D32242
llvm-svn: 300846
Diffstat (limited to 'llvm/lib/Support/Process.cpp')
0 files changed, 0 insertions, 0 deletions

