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 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
312 static uint16_t gcGeneration() { return s_gcGeneration; } | 312 static uint16_t gcGeneration() { return s_gcGeneration; } |
313 #endif | 313 #endif |
314 | 314 |
315 private: | 315 private: |
316 // Reset counters that track live and allocated-since-last-GC sizes. | 316 // Reset counters that track live and allocated-since-last-GC sizes. |
317 static void resetHeapCounters(); | 317 static void resetHeapCounters(); |
318 | 318 |
319 static int heapIndexForObjectSize(size_t); | 319 static int heapIndexForObjectSize(size_t); |
320 static bool isNormalHeapIndex(int); | 320 static bool isNormalHeapIndex(int); |
321 | 321 |
| 322 static void decommitCallbackStacks(); |
| 323 |
322 static CallbackStack* s_markingStack; | 324 static CallbackStack* s_markingStack; |
323 static CallbackStack* s_postMarkingCallbackStack; | 325 static CallbackStack* s_postMarkingCallbackStack; |
324 static CallbackStack* s_globalWeakCallbackStack; | 326 static CallbackStack* s_globalWeakCallbackStack; |
325 static CallbackStack* s_ephemeronStack; | 327 static CallbackStack* s_ephemeronStack; |
326 static HeapDoesNotContainCache* s_heapDoesNotContainCache; | 328 static HeapDoesNotContainCache* s_heapDoesNotContainCache; |
327 static bool s_shutdownCalled; | 329 static bool s_shutdownCalled; |
328 static FreePagePool* s_freePagePool; | 330 static FreePagePool* s_freePagePool; |
329 static OrphanedPagePool* s_orphanedPagePool; | 331 static OrphanedPagePool* s_orphanedPagePool; |
330 static RegionTree* s_regionTree; | 332 static RegionTree* s_regionTree; |
331 static size_t s_allocatedSpace; | 333 static size_t s_allocatedSpace; |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
541 void VisitorHelper<Derived>::handleWeakCell(Visitor* self, void* object) | 543 void VisitorHelper<Derived>::handleWeakCell(Visitor* self, void* object) |
542 { | 544 { |
543 T** cell = reinterpret_cast<T**>(object); | 545 T** cell = reinterpret_cast<T**>(object); |
544 if (*cell && !ObjectAliveTrait<T>::isHeapObjectAlive(*cell)) | 546 if (*cell && !ObjectAliveTrait<T>::isHeapObjectAlive(*cell)) |
545 *cell = nullptr; | 547 *cell = nullptr; |
546 } | 548 } |
547 | 549 |
548 } // namespace blink | 550 } // namespace blink |
549 | 551 |
550 #endif // Heap_h | 552 #endif // Heap_h |
OLD | NEW |