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

Side by Side Diff: third_party/WebKit/Source/platform/wtf/allocator/Partitions.h

Issue 2948983002: Low memory page navigation GC for low end devices (Closed)
Patch Set: fix Created 3 years, 5 months 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 88
89 static size_t TotalSizeOfCommittedPages() { 89 static size_t TotalSizeOfCommittedPages() {
90 size_t total_size = 0; 90 size_t total_size = 0;
91 total_size += fast_malloc_allocator_.root()->total_size_of_committed_pages; 91 total_size += fast_malloc_allocator_.root()->total_size_of_committed_pages;
92 total_size += array_buffer_allocator_.root()->total_size_of_committed_pages; 92 total_size += array_buffer_allocator_.root()->total_size_of_committed_pages;
93 total_size += buffer_allocator_.root()->total_size_of_committed_pages; 93 total_size += buffer_allocator_.root()->total_size_of_committed_pages;
94 total_size += layout_allocator_.root()->total_size_of_committed_pages; 94 total_size += layout_allocator_.root()->total_size_of_committed_pages;
95 return total_size; 95 return total_size;
96 } 96 }
97 97
98 static size_t TotalActiveBytes();
99
98 static void DecommitFreeableMemory(); 100 static void DecommitFreeableMemory();
99 101
100 static void ReportMemoryUsageHistogram(); 102 static void ReportMemoryUsageHistogram();
101 103
102 static void DumpMemoryStats(bool is_light_dump, base::PartitionStatsDumper*); 104 static void DumpMemoryStats(bool is_light_dump, base::PartitionStatsDumper*);
103 105
104 ALWAYS_INLINE static void* BufferMalloc(size_t n, const char* type_name) { 106 ALWAYS_INLINE static void* BufferMalloc(size_t n, const char* type_name) {
105 return PartitionAllocGeneric(BufferPartition(), n, type_name); 107 return PartitionAllocGeneric(BufferPartition(), n, type_name);
106 } 108 }
107 ALWAYS_INLINE static void* BufferRealloc(void* p, 109 ALWAYS_INLINE static void* BufferRealloc(void* p,
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 using base::PageAccessible; 169 using base::PageAccessible;
168 using base::PageInaccessible; 170 using base::PageInaccessible;
169 using base::PartitionStatsDumper; 171 using base::PartitionStatsDumper;
170 using base::PartitionMemoryStats; 172 using base::PartitionMemoryStats;
171 using base::PartitionBucketMemoryStats; 173 using base::PartitionBucketMemoryStats;
172 using base::PartitionAllocHooks; 174 using base::PartitionAllocHooks;
173 175
174 } // namespace WTF 176 } // namespace WTF
175 177
176 #endif // Partitions_h 178 #endif // Partitions_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698