Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3463)

Unified Diff: base/metrics/field_trial.cc

Issue 2529183002: Bump field trial allocator size to 128 KiB (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/metrics/field_trial.cc
diff --git a/base/metrics/field_trial.cc b/base/metrics/field_trial.cc
index 7dc5cb454e55877d7e345bbe13c1a4acca4d2711..1f18658abd72faf92b39ff982873a84c64ac7c91 100644
--- a/base/metrics/field_trial.cc
+++ b/base/metrics/field_trial.cc
@@ -44,16 +44,15 @@ const bool kUseSharedMemoryForFieldTrials = true;
const char kAllocatorName[] = "FieldTrialAllocator";
const uint32_t kFieldTrialType = 0xABA17E13 + 2; // SHA1(FieldTrialEntry) v2
-// We allocate 64 KiB to hold all the field trial data. This should be enough,
-// as currently we use ~8KiB for the field trials, and ~10KiB for experiment
-// parameters (as of 9/11/2016). This also doesn't allocate all 64 KiB at once
-// -- the pages only get mapped to physical memory when they are touched. If the
-// size of the allocated field trials does get larger than 64 KiB, then we will
-// drop some field trials in child processes, leading to an inconsistent view
-// between browser and child processes and possibly causing crashes (see
-// crbug.com/661617).
+// We allocate 128 KiB to hold all the field trial data. This should be enough,
+// as most people use 3 - 25 KiB for field trials (as of 11/25/2016).
+// This also doesn't allocate all 128 KiB at once -- the pages only get mapped
+// to physical memory when they are touched. If the size of the allocated field
+// trials does get larger than 128 KiB, then we will drop some field trials in
+// child processes, leading to an inconsistent view between browser and child
+// processes and possibly causing crashes (see crbug.com/661617).
#if !defined(OS_NACL)
-const size_t kFieldTrialAllocationSize = 64 << 10; // 64 KiB
+const size_t kFieldTrialAllocationSize = 128 << 10; // 128 KiB
#endif
// We create one FieldTrialEntry per field trial in shared memory, via
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698