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

Side by Side Diff: src/heap.h

Issue 6993057: Version 3.4.2 (Closed) Base URL: http://v8.googlecode.com/svn/trunk/
Patch Set: Created 9 years, 6 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/gdb-jit.cc ('k') | src/heap.cc » ('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 1036 matching lines...) Expand 10 before | Expand all | Expand 10 after
1047 1047
1048 // Given an address occupied by a live code object, return that object. 1048 // Given an address occupied by a live code object, return that object.
1049 Object* FindCodeObject(Address a); 1049 Object* FindCodeObject(Address a);
1050 1050
1051 // Invoke Shrink on shrinkable spaces. 1051 // Invoke Shrink on shrinkable spaces.
1052 void Shrink(); 1052 void Shrink();
1053 1053
1054 enum HeapState { NOT_IN_GC, SCAVENGE, MARK_COMPACT }; 1054 enum HeapState { NOT_IN_GC, SCAVENGE, MARK_COMPACT };
1055 inline HeapState gc_state() { return gc_state_; } 1055 inline HeapState gc_state() { return gc_state_; }
1056 1056
1057 inline bool IsInGCPostProcessing() { return gc_post_processing_depth_ > 0; }
1058
1057 #ifdef DEBUG 1059 #ifdef DEBUG
1058 bool IsAllocationAllowed() { return allocation_allowed_; } 1060 bool IsAllocationAllowed() { return allocation_allowed_; }
1059 inline bool allow_allocation(bool enable); 1061 inline bool allow_allocation(bool enable);
1060 1062
1061 bool disallow_allocation_failure() { 1063 bool disallow_allocation_failure() {
1062 return disallow_allocation_failure_; 1064 return disallow_allocation_failure_;
1063 } 1065 }
1064 1066
1065 void TracePathToObject(Object* target); 1067 void TracePathToObject(Object* target);
1066 void TracePathToGlobal(); 1068 void TracePathToGlobal();
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
1270 #endif 1272 #endif
1271 1273
1272 NewSpace new_space_; 1274 NewSpace new_space_;
1273 OldSpace* old_pointer_space_; 1275 OldSpace* old_pointer_space_;
1274 OldSpace* old_data_space_; 1276 OldSpace* old_data_space_;
1275 OldSpace* code_space_; 1277 OldSpace* code_space_;
1276 MapSpace* map_space_; 1278 MapSpace* map_space_;
1277 CellSpace* cell_space_; 1279 CellSpace* cell_space_;
1278 LargeObjectSpace* lo_space_; 1280 LargeObjectSpace* lo_space_;
1279 HeapState gc_state_; 1281 HeapState gc_state_;
1282 int gc_post_processing_depth_;
1280 1283
1281 // Returns the size of object residing in non new spaces. 1284 // Returns the size of object residing in non new spaces.
1282 intptr_t PromotedSpaceSize(); 1285 intptr_t PromotedSpaceSize();
1283 1286
1284 // Returns the amount of external memory registered since last global gc. 1287 // Returns the amount of external memory registered since last global gc.
1285 int PromotedExternalMemorySize(); 1288 int PromotedExternalMemorySize();
1286 1289
1287 int mc_count_; // how many mark-compact collections happened 1290 int mc_count_; // how many mark-compact collections happened
1288 int ms_count_; // how many mark-sweep collections happened 1291 int ms_count_; // how many mark-sweep collections happened
1289 unsigned int gc_count_; // how many gc happened 1292 unsigned int gc_count_; // how many gc happened
(...skipping 969 matching lines...) Expand 10 before | Expand all | Expand 10 after
2259 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); 2262 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer);
2260 }; 2263 };
2261 #endif // DEBUG || LIVE_OBJECT_LIST 2264 #endif // DEBUG || LIVE_OBJECT_LIST
2262 2265
2263 2266
2264 } } // namespace v8::internal 2267 } } // namespace v8::internal
2265 2268
2266 #undef HEAP 2269 #undef HEAP
2267 2270
2268 #endif // V8_HEAP_H_ 2271 #endif // V8_HEAP_H_
OLDNEW
« no previous file with comments | « src/gdb-jit.cc ('k') | src/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698