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 |
282 static CallbackStack* s_markingStack; | 284 static CallbackStack* s_markingStack; |
283 static CallbackStack* s_postMarkingCallbackStack; | 285 static CallbackStack* s_postMarkingCallbackStack; |
284 static CallbackStack* s_globalWeakCallbackStack; | 286 static CallbackStack* s_globalWeakCallbackStack; |
285 static CallbackStack* s_ephemeronStack; | 287 static CallbackStack* s_ephemeronStack; |
286 static HeapDoesNotContainCache* s_heapDoesNotContainCache; | 288 static HeapDoesNotContainCache* s_heapDoesNotContainCache; |
287 static bool s_shutdownCalled; | 289 static bool s_shutdownCalled; |
288 static FreePagePool* s_freePagePool; | 290 static FreePagePool* s_freePagePool; |
289 static OrphanedPagePool* s_orphanedPagePool; | 291 static OrphanedPagePool* s_orphanedPagePool; |
290 static RegionTree* s_regionTree; | 292 static RegionTree* s_regionTree; |
291 static size_t s_allocatedSpace; | 293 static size_t s_allocatedSpace; |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
496 void VisitorHelper<Derived>::handleWeakCell(Visitor* self, void* object) | 498 void VisitorHelper<Derived>::handleWeakCell(Visitor* self, void* object) |
497 { | 499 { |
498 T** cell = reinterpret_cast<T**>(object); | 500 T** cell = reinterpret_cast<T**>(object); |
499 if (*cell && !ObjectAliveTrait<T>::isHeapObjectAlive(*cell)) | 501 if (*cell && !ObjectAliveTrait<T>::isHeapObjectAlive(*cell)) |
500 *cell = nullptr; | 502 *cell = nullptr; |
501 } | 503 } |
502 | 504 |
503 } // namespace blink | 505 } // namespace blink |
504 | 506 |
505 #endif // Heap_h | 507 #endif // Heap_h |
OLD | NEW |