OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 1123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1134 static HeapState gc_state_; | 1134 static HeapState gc_state_; |
1135 | 1135 |
1136 // Returns the size of object residing in non new spaces. | 1136 // Returns the size of object residing in non new spaces. |
1137 static intptr_t PromotedSpaceSize(); | 1137 static intptr_t PromotedSpaceSize(); |
1138 | 1138 |
1139 // Returns the amount of external memory registered since last global gc. | 1139 // Returns the amount of external memory registered since last global gc. |
1140 static int PromotedExternalMemorySize(); | 1140 static int PromotedExternalMemorySize(); |
1141 | 1141 |
1142 static int mc_count_; // how many mark-compact collections happened | 1142 static int mc_count_; // how many mark-compact collections happened |
1143 static int ms_count_; // how many mark-sweep collections happened | 1143 static int ms_count_; // how many mark-sweep collections happened |
1144 static int gc_count_; // how many gc happened | 1144 static unsigned int gc_count_; // how many gc happened |
1145 | 1145 |
1146 // Total length of the strings we failed to flatten since the last GC. | 1146 // Total length of the strings we failed to flatten since the last GC. |
1147 static int unflattened_strings_length_; | 1147 static int unflattened_strings_length_; |
1148 | 1148 |
1149 #define ROOT_ACCESSOR(type, name, camel_name) \ | 1149 #define ROOT_ACCESSOR(type, name, camel_name) \ |
1150 static inline void set_##name(type* value) { \ | 1150 static inline void set_##name(type* value) { \ |
1151 roots_[k##camel_name##RootIndex] = value; \ | 1151 roots_[k##camel_name##RootIndex] = value; \ |
1152 } | 1152 } |
1153 ROOT_LIST(ROOT_ACCESSOR) | 1153 ROOT_LIST(ROOT_ACCESSOR) |
1154 #undef ROOT_ACCESSOR | 1154 #undef ROOT_ACCESSOR |
(...skipping 951 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2106 // Return whether this object should be retained. If NULL is returned the | 2106 // Return whether this object should be retained. If NULL is returned the |
2107 // object has no references. Otherwise the address of the retained object | 2107 // object has no references. Otherwise the address of the retained object |
2108 // should be returned as in some GC situations the object has been moved. | 2108 // should be returned as in some GC situations the object has been moved. |
2109 virtual Object* RetainAs(Object* object) = 0; | 2109 virtual Object* RetainAs(Object* object) = 0; |
2110 }; | 2110 }; |
2111 | 2111 |
2112 | 2112 |
2113 } } // namespace v8::internal | 2113 } } // namespace v8::internal |
2114 | 2114 |
2115 #endif // V8_HEAP_H_ | 2115 #endif // V8_HEAP_H_ |
OLD | NEW |