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

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

Issue 2833123002: Replace ASSERT_NOT_REACHED, and RELEASE_ASSERT in platform/wtf (Closed)
Patch Set: wtf Created 3 years, 7 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 fast_malloc_allocator_.init(); 58 fast_malloc_allocator_.init();
59 array_buffer_allocator_.init(); 59 array_buffer_allocator_.init();
60 buffer_allocator_.init(); 60 buffer_allocator_.init();
61 layout_allocator_.init(); 61 layout_allocator_.init();
62 report_size_function_ = report_size_function; 62 report_size_function_ = report_size_function;
63 initialized_ = true; 63 initialized_ = true;
64 } 64 }
65 } 65 }
66 66
67 void Partitions::DecommitFreeableMemory() { 67 void Partitions::DecommitFreeableMemory() {
68 RELEASE_ASSERT(IsMainThread()); 68 CHECK(IsMainThread());
69 if (!initialized_) 69 if (!initialized_)
70 return; 70 return;
71 71
72 PartitionPurgeMemoryGeneric(ArrayBufferPartition(), 72 PartitionPurgeMemoryGeneric(ArrayBufferPartition(),
73 base::PartitionPurgeDecommitEmptyPages); 73 base::PartitionPurgeDecommitEmptyPages);
74 PartitionPurgeMemoryGeneric(BufferPartition(), 74 PartitionPurgeMemoryGeneric(BufferPartition(),
75 base::PartitionPurgeDecommitEmptyPages); 75 base::PartitionPurgeDecommitEmptyPages);
76 PartitionPurgeMemoryGeneric(FastMallocPartition(), 76 PartitionPurgeMemoryGeneric(FastMallocPartition(),
77 base::PartitionPurgeDecommitEmptyPages); 77 base::PartitionPurgeDecommitEmptyPages);
78 PartitionPurgeMemory(LayoutPartition(), 78 PartitionPurgeMemory(LayoutPartition(),
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 if (total_usage >= 64 * 1024 * 1024) 186 if (total_usage >= 64 * 1024 * 1024)
187 PartitionsOutOfMemoryUsing64M(); 187 PartitionsOutOfMemoryUsing64M();
188 if (total_usage >= 32 * 1024 * 1024) 188 if (total_usage >= 32 * 1024 * 1024)
189 PartitionsOutOfMemoryUsing32M(); 189 PartitionsOutOfMemoryUsing32M();
190 if (total_usage >= 16 * 1024 * 1024) 190 if (total_usage >= 16 * 1024 * 1024)
191 PartitionsOutOfMemoryUsing16M(); 191 PartitionsOutOfMemoryUsing16M();
192 PartitionsOutOfMemoryUsingLessThan16M(); 192 PartitionsOutOfMemoryUsingLessThan16M();
193 } 193 }
194 194
195 } // namespace WTF 195 } // namespace WTF
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/wtf/WTF.cpp ('k') | third_party/WebKit/Source/platform/wtf/dtoa/utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698