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

Side by Side Diff: src/heap.h

Issue 53004: Add basic infrastructure for protecting V8's heap when leaving the VM... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 9 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/globals.h ('k') | src/heap.cc » ('j') | src/log.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 return reinterpret_cast<Address>(&always_allocate_scope_depth_); 266 return reinterpret_cast<Address>(&always_allocate_scope_depth_);
267 } 267 }
268 268
269 static Address* NewSpaceAllocationTopAddress() { 269 static Address* NewSpaceAllocationTopAddress() {
270 return new_space_.allocation_top_address(); 270 return new_space_.allocation_top_address();
271 } 271 }
272 static Address* NewSpaceAllocationLimitAddress() { 272 static Address* NewSpaceAllocationLimitAddress() {
273 return new_space_.allocation_limit_address(); 273 return new_space_.allocation_limit_address();
274 } 274 }
275 275
276 #ifdef ENABLE_HEAP_PROTECTION
277 // Protect/unprotect the heap by marking all spaces read-only/writable.
278 static void Protect();
279 static void Unprotect();
280 #endif
281
276 // Allocates and initializes a new JavaScript object based on a 282 // Allocates and initializes a new JavaScript object based on a
277 // constructor. 283 // constructor.
278 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation 284 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation
279 // failed. 285 // failed.
280 // Please note this does not perform a garbage collection. 286 // Please note this does not perform a garbage collection.
281 static Object* AllocateJSObject(JSFunction* constructor, 287 static Object* AllocateJSObject(JSFunction* constructor,
282 PretenureFlag pretenure = NOT_TENURED); 288 PretenureFlag pretenure = NOT_TENURED);
283 289
284 // Returns a deep copy of the JavaScript object. 290 // Returns a deep copy of the JavaScript object.
285 // Properties and elements are copied too. 291 // Properties and elements are copied too.
(...skipping 1012 matching lines...) Expand 10 before | Expand all | Expand 10 after
1298 int marked_count_; 1304 int marked_count_;
1299 1305
1300 // The count from the end of the previous full GC. Will be zero if there 1306 // The count from the end of the previous full GC. Will be zero if there
1301 // was no previous full GC. 1307 // was no previous full GC.
1302 int previous_marked_count_; 1308 int previous_marked_count_;
1303 }; 1309 };
1304 1310
1305 } } // namespace v8::internal 1311 } } // namespace v8::internal
1306 1312
1307 #endif // V8_HEAP_H_ 1313 #endif // V8_HEAP_H_
OLDNEW
« no previous file with comments | « src/globals.h ('k') | src/heap.cc » ('j') | src/log.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698