| Index: third_party/sqlite/BUILD.gn
|
| diff --git a/third_party/sqlite/BUILD.gn b/third_party/sqlite/BUILD.gn
|
| index 395bfa5750f68f323ef952d7792cb591e68c7e22..a7cb64e591af4d1431fd812bd3d14c9939ab3bc9 100644
|
| --- a/third_party/sqlite/BUILD.gn
|
| +++ b/third_party/sqlite/BUILD.gn
|
| @@ -68,13 +68,6 @@ if (!use_system_sqlite) {
|
| # 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.
|
| @@ -157,6 +150,20 @@ if (!use_system_sqlite) {
|
| ]
|
| }
|
|
|
| + if (defined(android_channel) && android_channel == "work") {
|
| + defines += [
|
| + "SQLITE_MAX_MMAP_SIZE=0",
|
| + ]
|
| + } else {
|
| + defines += [
|
| + # 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",
|
| + ]
|
| + }
|
| deps = [
|
| "//third_party/icu",
|
| ]
|
|
|