| 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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 | 100 |
| 101 #if ENABLE(GC_PROFILING) | 101 #if ENABLE(GC_PROFILING) |
| 102 static String classOf(const void* object) | 102 static String classOf(const void* object) |
| 103 { | 103 { |
| 104 if (const GCInfo* gcInfo = Heap::findGCInfo(reinterpret_cast<Address>(const_
cast<void*>(object)))) | 104 if (const GCInfo* gcInfo = Heap::findGCInfo(reinterpret_cast<Address>(const_
cast<void*>(object)))) |
| 105 return gcInfo->m_className; | 105 return gcInfo->m_className; |
| 106 return "unknown"; | 106 return "unknown"; |
| 107 } | 107 } |
| 108 #endif | 108 #endif |
| 109 | 109 |
| 110 static bool vTableInitialized(void* objectPointer) | |
| 111 { | |
| 112 return !!(*reinterpret_cast<Address*>(objectPointer)); | |
| 113 } | |
| 114 | |
| 115 static size_t roundToOsPageSize(size_t size) | 110 static size_t roundToOsPageSize(size_t size) |
| 116 { | 111 { |
| 117 return (size + WTF::kSystemPageSize - 1) & ~(WTF::kSystemPageSize - 1); | 112 return (size + WTF::kSystemPageSize - 1) & ~(WTF::kSystemPageSize - 1); |
| 118 } | 113 } |
| 119 | 114 |
| 120 class MemoryRegion { | 115 class MemoryRegion { |
| 121 public: | 116 public: |
| 122 MemoryRegion(Address base, size_t size) | 117 MemoryRegion(Address base, size_t size) |
| 123 : m_base(base) | 118 : m_base(base) |
| 124 , m_size(size) | 119 , m_size(size) |
| (...skipping 2563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2688 size_t Heap::s_allocatedObjectSize = 0; | 2683 size_t Heap::s_allocatedObjectSize = 0; |
| 2689 size_t Heap::s_allocatedSpace = 0; | 2684 size_t Heap::s_allocatedSpace = 0; |
| 2690 size_t Heap::s_markedObjectSize = 0; | 2685 size_t Heap::s_markedObjectSize = 0; |
| 2691 // We don't want to use 0 KB for the initial value because it may end up | 2686 // We don't want to use 0 KB for the initial value because it may end up |
| 2692 // triggering the first GC of some thread too prematurely. | 2687 // triggering the first GC of some thread too prematurely. |
| 2693 size_t Heap::s_estimatedLiveObjectSize = 512 * 1024; | 2688 size_t Heap::s_estimatedLiveObjectSize = 512 * 1024; |
| 2694 size_t Heap::s_externalObjectSizeAtLastGC = 0; | 2689 size_t Heap::s_externalObjectSizeAtLastGC = 0; |
| 2695 double Heap::s_estimatedMarkingTimePerByte = 0.0; | 2690 double Heap::s_estimatedMarkingTimePerByte = 0.0; |
| 2696 | 2691 |
| 2697 } // namespace blink | 2692 } // namespace blink |
| OLD | NEW |