| 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 return gcInfo->m_className; | 70 return gcInfo->m_className; |
| 71 return "unknown"; | 71 return "unknown"; |
| 72 } | 72 } |
| 73 #endif | 73 #endif |
| 74 | 74 |
| 75 static bool vTableInitialized(void* objectPointer) | 75 static bool vTableInitialized(void* objectPointer) |
| 76 { | 76 { |
| 77 return !!(*reinterpret_cast<Address*>(objectPointer)); | 77 return !!(*reinterpret_cast<Address*>(objectPointer)); |
| 78 } | 78 } |
| 79 | 79 |
| 80 #if OS(WIN) | |
| 81 static bool IsPowerOf2(size_t power) | |
| 82 { | |
| 83 return !((power - 1) & power); | |
| 84 } | |
| 85 #endif | |
| 86 | |
| 87 static Address roundToBlinkPageBoundary(void* base) | 80 static Address roundToBlinkPageBoundary(void* base) |
| 88 { | 81 { |
| 89 return reinterpret_cast<Address>((reinterpret_cast<uintptr_t>(base) + blinkP
ageOffsetMask) & blinkPageBaseMask); | 82 return reinterpret_cast<Address>((reinterpret_cast<uintptr_t>(base) + blinkP
ageOffsetMask) & blinkPageBaseMask); |
| 90 } | 83 } |
| 91 | 84 |
| 92 static size_t roundToOsPageSize(size_t size) | 85 static size_t roundToOsPageSize(size_t size) |
| 93 { | 86 { |
| 94 return (size + WTF::kSystemPageSize - 1) & ~(WTF::kSystemPageSize - 1); | 87 return (size + WTF::kSystemPageSize - 1) & ~(WTF::kSystemPageSize - 1); |
| 95 } | 88 } |
| 96 | 89 |
| (...skipping 2615 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2712 bool Heap::s_shutdownCalled = false; | 2705 bool Heap::s_shutdownCalled = false; |
| 2713 bool Heap::s_lastGCWasConservative = false; | 2706 bool Heap::s_lastGCWasConservative = false; |
| 2714 FreePagePool* Heap::s_freePagePool; | 2707 FreePagePool* Heap::s_freePagePool; |
| 2715 OrphanedPagePool* Heap::s_orphanedPagePool; | 2708 OrphanedPagePool* Heap::s_orphanedPagePool; |
| 2716 Heap::RegionTree* Heap::s_regionTree = nullptr; | 2709 Heap::RegionTree* Heap::s_regionTree = nullptr; |
| 2717 size_t Heap::s_allocatedObjectSize = 0; | 2710 size_t Heap::s_allocatedObjectSize = 0; |
| 2718 size_t Heap::s_allocatedSpace = 0; | 2711 size_t Heap::s_allocatedSpace = 0; |
| 2719 size_t Heap::s_markedObjectSize = 0; | 2712 size_t Heap::s_markedObjectSize = 0; |
| 2720 | 2713 |
| 2721 } // namespace blink | 2714 } // namespace blink |
| OLD | NEW |