Index: third_party/sqlite/sqlite.gyp |
diff --git a/third_party/sqlite/sqlite.gyp b/third_party/sqlite/sqlite.gyp |
index 160a4b27db3c27b6dd63a8eeb92df610e26263b7..e8ad2102d0048a85537d2f70928c20e5e1823b04 100644 |
--- a/third_party/sqlite/sqlite.gyp |
+++ b/third_party/sqlite/sqlite.gyp |
@@ -28,6 +28,12 @@ |
# appropriately. Chromium doesn't configure SQLite for that, and would |
# prefer to control distribution to worker threads. |
'SQLITE_MAX_WORKER_THREADS=0', |
+ # Allow 256MB mmap footprint per connection. Should not be too open-ended |
+ # as that could cause memory fragmentation. 50MB encompasses the 99th |
+ # percentile of Chrome databases in the wild. |
+ # TODO(shess): A 64-bit-specific value could be 1G or more. |
+ # TODO(shess): Figure out if exceeding this is costly. |
+ 'SQLITE_MAX_MMAP_SIZE=268435456', |
# Use a read-only memory map when mmap'ed I/O is enabled to prevent memory |
# stompers from directly corrupting the database. |
# TODO(shess): Upstream the ability to use this define. |