reveman@chromium.org
bc5bb33c7c
base: Avoid purging more discardable memory than necessary.
...
In situations when discardable memory usage is above the limit,
instead of purging the amount of memory that we would try to
reclaim under moderate memory pressure, purge only what is
necessary to stay below the limit.
This simplifies the code and makes it easier to understand how
memory is purged as a result of reaching the memory limit.
BUG=237681
TEST=base_unittests --gtest_filter=DiscardableMemoryProviderPermutationTests/DiscardableMemoryProviderPermutationTest.LRUDiscardedAmount/*
Review URL: https://codereview.chromium.org/59083011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@234652 0039d316-1c4b-4281-b951-d872f2087c98
2013-11-12 22:43:23 +00:00
..
2013-11-08 01:44:07 +00:00
2013-11-11 20:29:31 +00:00
2013-10-30 16:33:30 +00:00
2013-04-07 16:27:46 +00:00
2013-11-11 17:25:33 +00:00
2013-11-12 01:59:02 +00:00
2013-10-08 07:10:42 +00:00
2013-06-29 14:16:00 +00:00
2013-09-06 07:35:27 +00:00
2013-10-30 18:21:41 +00:00
2013-11-12 22:43:23 +00:00
2013-11-12 16:35:02 +00:00
2013-10-30 10:12:15 +00:00
2013-07-15 20:18:09 +00:00
2013-08-13 17:10:56 +00:00
2013-11-05 04:15:10 +00:00
2013-11-01 00:52:35 +00:00
2013-11-12 01:59:02 +00:00
2013-09-10 23:36:08 +00:00
2013-10-23 13:37:04 +00:00
2013-10-17 09:18:09 +00:00
2013-07-18 08:12:40 +00:00
2013-11-12 20:38:08 +00:00
2013-10-15 20:29:03 +00:00
2013-11-08 06:16:53 +00:00
2013-11-12 06:12:38 +00:00
2013-09-29 18:06:13 +00:00
2013-11-08 22:50:09 +00:00
2013-09-27 05:07:30 +00:00
2013-08-23 15:56:33 +00:00
2013-08-23 15:56:33 +00:00
2013-08-23 15:56:33 +00:00
2013-08-28 20:13:36 +00:00
2012-07-25 20:36:33 +00:00
2012-07-25 20:36:33 +00:00
2013-07-11 03:52:52 +00:00
2012-08-22 21:55:24 +00:00
2012-07-13 16:49:44 +00:00
2013-06-07 02:31:16 +00:00
2012-12-10 11:12:10 +00:00
2013-01-15 08:51:28 +00:00
2013-06-10 14:00:06 +00:00
2012-11-21 04:44:14 +00:00
2013-08-24 15:00:33 +00:00
2013-09-12 19:48:15 +00:00
2013-09-12 19:48:15 +00:00
2012-09-23 04:51:04 +00:00
2012-12-27 22:01:58 +00:00
2013-03-30 14:29:00 +00:00
2013-07-25 21:38:23 +00:00
2012-09-20 16:24:52 +00:00
2013-08-06 13:30:25 +00:00
2013-07-25 21:38:23 +00:00
2012-09-20 16:24:52 +00:00
2013-05-14 10:12:56 +00:00
2012-11-06 22:27:01 +00:00
2013-07-11 17:36:07 +00:00
2013-03-28 00:40:04 +00:00
2013-11-07 08:35:29 +00:00
2013-11-07 08:35:29 +00:00
2013-10-31 13:34:31 +00:00
2013-08-04 06:32:21 +00:00
2013-11-12 20:38:08 +00:00
2013-11-08 06:24:58 +00:00
2013-11-08 11:41:56 +00:00
2013-08-30 02:04:04 +00:00
2013-08-30 02:04:04 +00:00
2012-09-05 06:08:01 +00:00
2013-06-03 22:15:21 +00:00
2013-06-03 22:15:21 +00:00
2013-06-22 20:32:50 +00:00
2013-01-23 23:49:55 +00:00
2012-09-05 06:08:01 +00:00
2013-06-28 00:49:07 +00:00
2013-06-28 00:49:07 +00:00
2013-08-30 02:04:04 +00:00
2013-08-30 02:04:04 +00:00
2013-08-30 02:04:04 +00:00
2013-05-31 21:37:53 +00:00
2013-10-22 09:18:20 +00:00
2013-10-09 23:28:21 +00:00
2013-09-26 19:20:18 +00:00
2013-10-09 23:28:21 +00:00
2013-10-09 23:28:21 +00:00
2013-01-15 10:52:11 +00:00
2012-12-06 19:00:50 +00:00
2012-12-06 19:00:50 +00:00
2013-07-18 08:12:40 +00:00
2013-10-18 13:07:00 +00:00
2013-06-07 18:37:07 +00:00
2013-09-25 23:36:00 +00:00
2013-09-25 23:36:00 +00:00
2013-11-07 17:49:50 +00:00
2013-01-09 23:18:29 +00:00
2013-10-31 04:50:51 +00:00
2013-07-18 11:13:28 +00:00
2013-03-20 19:48:38 +00:00
2012-08-09 17:26:33 +00:00
2013-07-18 08:12:40 +00:00
2013-08-30 12:59:25 +00:00
2013-06-28 00:49:07 +00:00
2012-07-26 22:53:13 +00:00
2013-08-30 18:00:39 +00:00
2013-08-30 18:00:39 +00:00
2013-08-30 18:00:39 +00:00
2013-02-02 05:12:33 +00:00
2013-02-24 05:40:52 +00:00
2013-02-24 05:40:52 +00:00
2013-07-09 17:42:26 +00:00
2013-11-07 11:38:32 +00:00
2013-09-25 20:09:00 +00:00
2013-10-10 02:25:01 +00:00
2013-10-10 02:25:01 +00:00
2013-10-10 02:25:01 +00:00
2013-06-24 22:51:46 +00:00
2013-02-24 05:40:52 +00:00
2013-05-14 10:12:56 +00:00
2013-02-24 05:40:52 +00:00
2013-06-11 13:36:37 +00:00
2013-07-23 05:24:46 +00:00
2012-11-01 17:32:30 +00:00
2013-06-11 13:36:37 +00:00
2013-06-11 13:36:37 +00:00
2013-09-27 08:52:29 +00:00
2013-09-27 08:52:29 +00:00
2012-09-01 00:55:09 +00:00
2012-09-01 00:55:09 +00:00
2012-12-03 17:04:28 +00:00
2013-06-11 17:52:44 +00:00
2013-06-18 23:31:12 +00:00
2013-06-18 23:31:12 +00:00
2013-06-18 23:31:12 +00:00
2013-06-07 22:09:32 +00:00
2013-07-25 21:38:23 +00:00
2012-07-23 23:36:39 +00:00
2013-06-10 19:06:57 +00:00
2013-11-09 05:37:22 +00:00
2013-07-01 17:11:36 +00:00
2013-07-15 21:47:09 +00:00
2013-09-26 07:55:21 +00:00
2013-01-18 14:21:58 +00:00
2013-03-30 14:29:00 +00:00
2013-10-22 09:18:20 +00:00
2013-07-15 20:18:09 +00:00
2013-06-07 18:37:07 +00:00
2013-06-07 18:37:07 +00:00
2013-06-10 19:06:57 +00:00
2013-07-18 08:12:40 +00:00
2013-07-18 08:12:40 +00:00
2013-09-24 12:47:54 +00:00
2012-07-16 16:12:16 +00:00
2013-08-28 19:41:50 +00:00
2012-07-16 16:12:16 +00:00
2012-07-26 22:53:13 +00:00
2012-07-26 22:53:13 +00:00
2013-08-24 23:34:36 +00:00
2013-07-11 17:36:07 +00:00
2013-07-11 17:36:07 +00:00
2013-02-02 05:12:33 +00:00
2012-10-09 09:37:41 +00:00
2013-06-28 15:14:18 +00:00
2013-11-01 09:43:45 +00:00
2013-11-04 22:28:12 +00:00
2013-11-04 22:28:12 +00:00
2013-11-05 07:36:35 +00:00
2013-11-12 02:55:57 +00:00
2013-11-12 02:55:57 +00:00
2013-07-12 00:53:57 +00:00
2013-10-24 04:42:43 +00:00
2013-05-30 16:09:14 +00:00
2012-07-26 22:53:13 +00:00
2012-12-21 02:59:50 +00:00
2012-08-02 20:22:25 +00:00
2013-10-15 20:29:03 +00:00
2013-03-23 19:10:54 +00:00
2013-10-08 19:23:33 +00:00
2013-10-08 19:23:33 +00:00
2013-01-25 16:50:00 +00:00
2013-01-23 23:49:55 +00:00
2013-01-25 16:50:00 +00:00
2013-05-02 23:06:26 +00:00
2013-05-02 23:06:26 +00:00
2013-10-31 20:28:47 +00:00
2013-02-02 05:12:33 +00:00
2012-10-05 16:01:57 +00:00
2013-11-12 01:59:02 +00:00
2013-07-30 19:26:40 +00:00
2013-07-30 19:26:40 +00:00
2013-07-30 19:26:40 +00:00
2013-09-27 01:21:28 +00:00
2013-05-08 05:35:24 +00:00
2013-05-08 05:35:24 +00:00
2013-05-08 05:35:24 +00:00
2013-01-28 23:36:26 +00:00
2013-05-08 05:35:24 +00:00
2012-12-05 21:40:27 +00:00
2013-09-03 23:29:12 +00:00
2012-09-10 19:18:53 +00:00
2013-10-03 18:44:06 +00:00
2013-10-23 03:03:18 +00:00
2013-11-05 00:14:27 +00:00
2013-10-19 22:13:19 +00:00
2013-10-19 22:13:19 +00:00
2013-10-19 22:13:19 +00:00
2013-09-21 03:47:44 +00:00
2013-08-02 04:54:21 +00:00
2013-09-27 19:28:24 +00:00
2013-02-07 19:18:03 +00:00
2013-11-04 20:50:14 +00:00
2013-06-10 20:11:14 +00:00
2013-04-10 02:22:15 +00:00
2013-06-07 18:37:07 +00:00
2013-09-27 19:28:24 +00:00
2013-06-10 20:11:14 +00:00
2013-06-28 15:14:18 +00:00
2013-11-04 20:50:14 +00:00
2013-07-18 08:12:40 +00:00
2012-11-28 03:29:01 +00:00
2013-01-15 10:52:11 +00:00
2013-06-28 15:14:18 +00:00
2013-10-22 09:18:20 +00:00
2013-04-24 20:44:38 +00:00
2013-04-24 20:44:38 +00:00
2013-07-18 08:12:40 +00:00
2013-09-03 23:29:12 +00:00
2013-09-03 23:29:12 +00:00
2013-09-03 23:29:12 +00:00
2012-07-30 18:41:53 +00:00
2013-09-03 23:29:12 +00:00
2013-06-27 12:48:02 +00:00
2013-09-03 23:29:12 +00:00
2013-02-02 05:12:33 +00:00
2013-08-06 13:33:04 +00:00
2013-09-11 12:05:56 +00:00
2013-09-11 12:05:56 +00:00
2012-12-03 17:04:28 +00:00
2013-09-03 23:29:12 +00:00
2013-04-22 07:35:50 +00:00
2013-06-28 15:14:18 +00:00
2013-09-03 23:29:12 +00:00
2013-09-03 23:29:12 +00:00