[PATCH] D44444: [scudo] Add Chunk::getSize, rework Chunk::getUsableSize

Kostya Kortchinsky via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 13 12:49:49 PDT 2018


cryptoad created this revision.
cryptoad added a reviewer: alekseyshl.
Herald added subscribers: Sanitizers, delcypher.

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.


Repository:
  rCRT Compiler Runtime

https://reviews.llvm.org/D44444

Files:
  lib/scudo/scudo_allocator.cpp
  lib/scudo/scudo_allocator_combined.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D44444.138248.patch
Type: text/x-patch
Size: 5365 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180313/8f8901b4/attachment.bin>


More information about the llvm-commits mailing list