Commit d7fcbba8 authored by Samuel Groß's avatar Samuel Groß Committed by V8 LUCI CQ

[sandbox] Increase ExternalPointerTable maximum capacity to 512MB

Bug: v8:10391
Change-Id: I383e11bdccf6fcaf13f29d25e1404545067d313e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3891249Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
Commit-Queue: Samuel Groß <saelo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83203}
parent 3d59a3c2
...@@ -232,7 +232,7 @@ static_assert(kSandboxMinimumReservationSize > kPtrComprCageReservationSize, ...@@ -232,7 +232,7 @@ static_assert(kSandboxMinimumReservationSize > kPtrComprCageReservationSize,
// size allows omitting bounds checks on table accesses if the indices are // size allows omitting bounds checks on table accesses if the indices are
// guaranteed (e.g. through shifting) to be below the maximum index. This // guaranteed (e.g. through shifting) to be below the maximum index. This
// value must be a power of two. // value must be a power of two.
static const size_t kExternalPointerTableReservationSize = 128 * MB; static const size_t kExternalPointerTableReservationSize = 512 * MB;
// The maximum number of entries in an external pointer table. // The maximum number of entries in an external pointer table.
static const size_t kMaxExternalPointers = static const size_t kMaxExternalPointers =
...@@ -241,7 +241,7 @@ static const size_t kMaxExternalPointers = ...@@ -241,7 +241,7 @@ static const size_t kMaxExternalPointers =
// The external pointer table indices stored in HeapObjects as external // The external pointer table indices stored in HeapObjects as external
// pointers are shifted to the left by this amount to guarantee that they are // pointers are shifted to the left by this amount to guarantee that they are
// smaller than the maximum table size. // smaller than the maximum table size.
static const uint32_t kExternalPointerIndexShift = 8; static const uint32_t kExternalPointerIndexShift = 6;
static_assert((1 << (32 - kExternalPointerIndexShift)) == kMaxExternalPointers, static_assert((1 << (32 - kExternalPointerIndexShift)) == kMaxExternalPointers,
"kExternalPointerTableReservationSize and " "kExternalPointerTableReservationSize and "
"kExternalPointerIndexShift don't match"); "kExternalPointerIndexShift don't match");
......
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