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 1964 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1975 s_postMarkingCallbackStack = new CallbackStack(); | 1975 s_postMarkingCallbackStack = new CallbackStack(); |
1976 s_weakCallbackStack = new CallbackStack(); | 1976 s_weakCallbackStack = new CallbackStack(); |
1977 s_ephemeronStack = new CallbackStack(); | 1977 s_ephemeronStack = new CallbackStack(); |
1978 s_heapDoesNotContainCache = new HeapDoesNotContainCache(); | 1978 s_heapDoesNotContainCache = new HeapDoesNotContainCache(); |
1979 s_markingVisitor = new MarkingVisitor<GlobalMarking>(); | 1979 s_markingVisitor = new MarkingVisitor<GlobalMarking>(); |
1980 s_freePagePool = new FreePagePool(); | 1980 s_freePagePool = new FreePagePool(); |
1981 s_orphanedPagePool = new OrphanedPagePool(); | 1981 s_orphanedPagePool = new OrphanedPagePool(); |
1982 s_allocatedObjectSize = 0; | 1982 s_allocatedObjectSize = 0; |
1983 s_allocatedSpace = 0; | 1983 s_allocatedSpace = 0; |
1984 s_markedObjectSize = 0; | 1984 s_markedObjectSize = 0; |
1985 | |
1986 const size_t tableSize = gcInfoIndexMax * sizeof(GCInfo); | |
1987 s_gcInfoTable = reinterpret_cast<GCInfo const**>(new uint8_t[tableSize]); | |
haraken
2015/01/06 08:08:04
Can we add 'delete' code to doShutdown()?
sof
2015/01/06 08:19:18
Certainly, added.
| |
1988 memset(s_gcInfoTable, 0, tableSize); | |
1985 } | 1989 } |
1986 | 1990 |
1987 void Heap::shutdown() | 1991 void Heap::shutdown() |
1988 { | 1992 { |
1989 s_shutdownCalled = true; | 1993 s_shutdownCalled = true; |
1990 ThreadState::shutdownHeapIfNecessary(); | 1994 ThreadState::shutdownHeapIfNecessary(); |
1991 } | 1995 } |
1992 | 1996 |
1993 void Heap::doShutdown() | 1997 void Heap::doShutdown() |
1994 { | 1998 { |
(...skipping 625 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2620 bool Heap::s_shutdownCalled = false; | 2624 bool Heap::s_shutdownCalled = false; |
2621 bool Heap::s_lastGCWasConservative = false; | 2625 bool Heap::s_lastGCWasConservative = false; |
2622 FreePagePool* Heap::s_freePagePool; | 2626 FreePagePool* Heap::s_freePagePool; |
2623 OrphanedPagePool* Heap::s_orphanedPagePool; | 2627 OrphanedPagePool* Heap::s_orphanedPagePool; |
2624 Heap::RegionTree* Heap::s_regionTree = nullptr; | 2628 Heap::RegionTree* Heap::s_regionTree = nullptr; |
2625 size_t Heap::s_allocatedObjectSize = 0; | 2629 size_t Heap::s_allocatedObjectSize = 0; |
2626 size_t Heap::s_allocatedSpace = 0; | 2630 size_t Heap::s_allocatedSpace = 0; |
2627 size_t Heap::s_markedObjectSize = 0; | 2631 size_t Heap::s_markedObjectSize = 0; |
2628 | 2632 |
2629 } // namespace blink | 2633 } // namespace blink |
OLD | NEW |