OLD | NEW |
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 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
272 static uint16_t gcGeneration() { return s_gcGeneration; } | 272 static uint16_t gcGeneration() { return s_gcGeneration; } |
273 #endif | 273 #endif |
274 | 274 |
275 private: | 275 private: |
276 // Reset counters that track live and allocated-since-last-GC sizes. | 276 // Reset counters that track live and allocated-since-last-GC sizes. |
277 static void resetHeapCounters(); | 277 static void resetHeapCounters(); |
278 | 278 |
279 static int heapIndexForObjectSize(size_t); | 279 static int heapIndexForObjectSize(size_t); |
280 static bool isNormalHeapIndex(int); | 280 static bool isNormalHeapIndex(int); |
281 | 281 |
282 static void decommitCallbackStacks(); | |
283 | |
284 static CallbackStack* s_markingStack; | 282 static CallbackStack* s_markingStack; |
285 static CallbackStack* s_postMarkingCallbackStack; | 283 static CallbackStack* s_postMarkingCallbackStack; |
286 static CallbackStack* s_globalWeakCallbackStack; | 284 static CallbackStack* s_globalWeakCallbackStack; |
287 static CallbackStack* s_ephemeronStack; | 285 static CallbackStack* s_ephemeronStack; |
288 static HeapDoesNotContainCache* s_heapDoesNotContainCache; | 286 static HeapDoesNotContainCache* s_heapDoesNotContainCache; |
289 static bool s_shutdownCalled; | 287 static bool s_shutdownCalled; |
290 static FreePagePool* s_freePagePool; | 288 static FreePagePool* s_freePagePool; |
291 static OrphanedPagePool* s_orphanedPagePool; | 289 static OrphanedPagePool* s_orphanedPagePool; |
292 static RegionTree* s_regionTree; | 290 static RegionTree* s_regionTree; |
293 static size_t s_allocatedSpace; | 291 static size_t s_allocatedSpace; |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
498 void VisitorHelper<Derived>::handleWeakCell(Visitor* self, void* object) | 496 void VisitorHelper<Derived>::handleWeakCell(Visitor* self, void* object) |
499 { | 497 { |
500 T** cell = reinterpret_cast<T**>(object); | 498 T** cell = reinterpret_cast<T**>(object); |
501 if (*cell && !ObjectAliveTrait<T>::isHeapObjectAlive(*cell)) | 499 if (*cell && !ObjectAliveTrait<T>::isHeapObjectAlive(*cell)) |
502 *cell = nullptr; | 500 *cell = nullptr; |
503 } | 501 } |
504 | 502 |
505 } // namespace blink | 503 } // namespace blink |
506 | 504 |
507 #endif // Heap_h | 505 #endif // Heap_h |
OLD | NEW |