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

Side by Side Diff: src/heap.cc

Issue 7324051: Remove heap protection support. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 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 | Annotate | Revision Log
« no previous file with comments | « src/heap.h ('k') | src/platform.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 5195 matching lines...) Expand 10 before | Expand all | Expand 10 after
5206 5206
5207 5207
5208 void Heap::Shrink() { 5208 void Heap::Shrink() {
5209 // Try to shrink all paged spaces. 5209 // Try to shrink all paged spaces.
5210 PagedSpaces spaces; 5210 PagedSpaces spaces;
5211 for (PagedSpace* space = spaces.next(); space != NULL; space = spaces.next()) 5211 for (PagedSpace* space = spaces.next(); space != NULL; space = spaces.next())
5212 space->Shrink(); 5212 space->Shrink();
5213 } 5213 }
5214 5214
5215 5215
5216 #ifdef ENABLE_HEAP_PROTECTION
5217
5218 void Heap::Protect() {
5219 if (HasBeenSetup()) {
5220 AllSpaces spaces;
5221 for (Space* space = spaces.next(); space != NULL; space = spaces.next())
5222 space->Protect();
5223 }
5224 }
5225
5226
5227 void Heap::Unprotect() {
5228 if (HasBeenSetup()) {
5229 AllSpaces spaces;
5230 for (Space* space = spaces.next(); space != NULL; space = spaces.next())
5231 space->Unprotect();
5232 }
5233 }
5234
5235 #endif
5236
5237
5238 void Heap::AddGCPrologueCallback(GCPrologueCallback callback, GCType gc_type) { 5216 void Heap::AddGCPrologueCallback(GCPrologueCallback callback, GCType gc_type) {
5239 ASSERT(callback != NULL); 5217 ASSERT(callback != NULL);
5240 GCPrologueCallbackPair pair(callback, gc_type); 5218 GCPrologueCallbackPair pair(callback, gc_type);
5241 ASSERT(!gc_prologue_callbacks_.Contains(pair)); 5219 ASSERT(!gc_prologue_callbacks_.Contains(pair));
5242 return gc_prologue_callbacks_.Add(pair); 5220 return gc_prologue_callbacks_.Add(pair);
5243 } 5221 }
5244 5222
5245 5223
5246 void Heap::RemoveGCPrologueCallback(GCPrologueCallback callback) { 5224 void Heap::RemoveGCPrologueCallback(GCPrologueCallback callback) {
5247 ASSERT(callback != NULL); 5225 ASSERT(callback != NULL);
(...skipping 795 matching lines...) Expand 10 before | Expand all | Expand 10 after
6043 } 6021 }
6044 6022
6045 6023
6046 void ExternalStringTable::TearDown() { 6024 void ExternalStringTable::TearDown() {
6047 new_space_strings_.Free(); 6025 new_space_strings_.Free();
6048 old_space_strings_.Free(); 6026 old_space_strings_.Free();
6049 } 6027 }
6050 6028
6051 6029
6052 } } // namespace v8::internal 6030 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap.h ('k') | src/platform.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698