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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 #include "public/platform/WebMemoryAllocatorDump.h" | 45 #include "public/platform/WebMemoryAllocatorDump.h" |
46 #include "public/platform/WebProcessMemoryDump.h" | 46 #include "public/platform/WebProcessMemoryDump.h" |
47 #include "wtf/Assertions.h" | 47 #include "wtf/Assertions.h" |
48 #include "wtf/DataLog.h" | 48 #include "wtf/DataLog.h" |
49 #include "wtf/LeakAnnotations.h" | 49 #include "wtf/LeakAnnotations.h" |
50 #include "wtf/MainThread.h" | 50 #include "wtf/MainThread.h" |
51 #include "wtf/Partitions.h" | 51 #include "wtf/Partitions.h" |
52 | 52 |
53 namespace blink { | 53 namespace blink { |
54 | 54 |
| 55 HeapAllocHooks::AllocationHook* HeapAllocHooks::m_allocationHook = nullptr; |
| 56 HeapAllocHooks::FreeHook* HeapAllocHooks::m_freeHook = nullptr; |
| 57 |
55 class GCForbiddenScope final { | 58 class GCForbiddenScope final { |
56 DISALLOW_NEW(); | 59 DISALLOW_NEW(); |
57 public: | 60 public: |
58 explicit GCForbiddenScope(ThreadState* state) | 61 explicit GCForbiddenScope(ThreadState* state) |
59 : m_state(state) | 62 : m_state(state) |
60 { | 63 { |
61 // Prevent nested collectGarbage() invocations. | 64 // Prevent nested collectGarbage() invocations. |
62 m_state->enterGCForbiddenScope(); | 65 m_state->enterGCForbiddenScope(); |
63 } | 66 } |
64 | 67 |
(...skipping 661 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
726 size_t Heap::s_wrapperCountAtLastGC = 0; | 729 size_t Heap::s_wrapperCountAtLastGC = 0; |
727 size_t Heap::s_collectedWrapperCount = 0; | 730 size_t Heap::s_collectedWrapperCount = 0; |
728 size_t Heap::s_partitionAllocSizeAtLastGC = 0; | 731 size_t Heap::s_partitionAllocSizeAtLastGC = 0; |
729 double Heap::s_estimatedMarkingTimePerByte = 0.0; | 732 double Heap::s_estimatedMarkingTimePerByte = 0.0; |
730 bool Heap::s_isLowEndDevice = false; | 733 bool Heap::s_isLowEndDevice = false; |
731 #if ENABLE(ASSERT) | 734 #if ENABLE(ASSERT) |
732 uint16_t Heap::s_gcGeneration = 0; | 735 uint16_t Heap::s_gcGeneration = 0; |
733 #endif | 736 #endif |
734 | 737 |
735 } // namespace blink | 738 } // namespace blink |
OLD | NEW |