llvm-project/compiler-rt/lib/scudo
Kostya Kortchinsky a51139046e [scudo] Add Chunk::getSize, rework Chunk::getUsableSize
Summary:
Using `getActuallyAllocatedSize` from the Combined resulting in mediocre
compiled code, as the `ClassId != 0` predicament was not propagated there,
resulting in additional branches and dead code. Move the logic in the frontend,
which results in better compiled code. Also I think it makes it slightly easier
to distinguish between the size the user requested, and the size that was
actually allocated by the allocator.

`const` a couple of things as well.

This has no functional impact.

Reviewers: alekseyshl

Reviewed By: alekseyshl

Subscribers: delcypher, #sanitizers, llvm-commits

Differential Revision: https://reviews.llvm.org/D44444

llvm-svn: 327525
2018-03-14 15:50:32 +00:00
..
CMakeLists.txt [scudo] Use gc-sections by default 2018-03-06 20:13:37 +00:00
scudo_allocator.cpp [scudo] Add Chunk::getSize, rework Chunk::getUsableSize 2018-03-14 15:50:32 +00:00
scudo_allocator.h [scudo] Introduce Chunk::getHeaderSize 2018-02-27 16:14:49 +00:00
scudo_allocator_combined.h [scudo] Add Chunk::getSize, rework Chunk::getUsableSize 2018-03-14 15:50:32 +00:00
scudo_allocator_secondary.h [scudo] Secondary allocator overhaul to support Windows 2018-03-12 19:29:38 +00:00
scudo_crc32.cpp [scudo] CRC32 optimizations 2017-05-09 15:12:38 +00:00
scudo_crc32.h [sanitizer] Add Scudo to the sanitizer lint checks. 2017-11-08 16:42:29 +00:00
scudo_flags.cpp [scudo] Allow options to be defined at compile time 2018-02-08 16:29:48 +00:00
scudo_flags.h [scudo] 32-bit and hardware agnostic support 2016-11-30 17:32:20 +00:00
scudo_flags.inc [scudo] Quarantine overhaul 2017-07-24 15:29:38 +00:00
scudo_interface_internal.h [scudo] Add default implementations for weak functions 2018-01-30 17:59:49 +00:00
scudo_malloc.cpp [scudo] Overhaul malloc related interceptors 2018-01-25 20:42:44 +00:00
scudo_new_delete.cpp [scudo] Application & platform compatibility changes 2017-08-16 16:40:48 +00:00
scudo_platform.h [scudo] Allow for weak hooks, gated by a define 2018-01-23 23:07:42 +00:00
scudo_termination.cpp [scudo] Make logging more consistent 2018-03-07 16:22:16 +00:00
scudo_tsd.h [sanitizer] Introduce a vDSO aware timing function 2017-12-13 16:23:54 +00:00
scudo_tsd_exclusive.cpp [scudo] Allow for non-Android Shared TSD platforms, part 1 2017-10-12 15:01:09 +00:00
scudo_tsd_exclusive.inc [scudo] Scudo thread specific data refactor, part 3 2017-09-26 17:20:02 +00:00
scudo_tsd_shared.cpp [scudo] Make getNumberOfCPUs Fuchsia compliant v2 2017-11-21 21:14:00 +00:00
scudo_tsd_shared.inc [scudo] Allow for non-Android Shared TSD platforms, part 2 2017-10-13 20:55:31 +00:00
scudo_utils.cpp [scudo] Make logging more consistent 2018-03-07 16:22:16 +00:00
scudo_utils.h [scudo] Minor code generation improvement 2017-12-08 16:36:37 +00:00