Commit 88100fa6 authored by Vlad Tsyrklevich's avatar Vlad Tsyrklevich Committed by Commit Bot

GWP-ASan: Increase maximum number of metadata

Due to performance regressions I've reduced the percentage of processes
GWP-ASan is enabled for. As a result, I've been able to proportionally
increase the amount of memory we use per process. As a result, the
previous maximum metadata of 255 no longer sufficies. Increase
MetadataIdx to be a 16-bit type and increase the maximum metadata to
something more reasonable.

Change-Id: If031dec3732ccf3ba69bdafdca2b03cb274bd9ef
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1761477
Commit-Queue: Vlad Tsyrklevich <vtsyrklevich@chromium.org>
Commit-Queue: Vitaly Buka <vitalybuka@chromium.org>
Auto-Submit: Vlad Tsyrklevich <vtsyrklevich@chromium.org>
Reviewed-by: default avatarVitaly Buka <vitalybuka@chromium.org>
Cr-Commit-Position: refs/heads/master@{#688424}
parent 9bb7abe2
...@@ -39,14 +39,14 @@ class GuardedPageAllocator; ...@@ -39,14 +39,14 @@ class GuardedPageAllocator;
class AllocatorState { class AllocatorState {
public: public:
using MetadataIdx = uint8_t; using MetadataIdx = uint16_t;
using SlotIdx = uint16_t; using SlotIdx = uint16_t;
// Maximum number of virtual memory slots (guard-page buffered pages) this // Maximum number of virtual memory slots (guard-page buffered pages) this
// class can allocate. // class can allocate.
static constexpr size_t kMaxSlots = 4096; static constexpr size_t kMaxSlots = 4096;
// Maximum number of concurrent allocations/metadata this class can allocate. // Maximum number of concurrent allocations/metadata this class can allocate.
static constexpr size_t kMaxMetadata = 255; static constexpr size_t kMaxMetadata = 2048;
// Invalid metadata index. // Invalid metadata index.
static constexpr MetadataIdx kInvalidMetadataIdx = kMaxMetadata; static constexpr MetadataIdx kInvalidMetadataIdx = kMaxMetadata;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment