Changeset 140195 in webkit for trunk/Source/JavaScriptCore/heap/MarkStack.h
- Timestamp:
- Jan 18, 2013, 12:49:58 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/heap/MarkStack.h
r135469 r140195 76 76 return bitwise_cast<const JSCell**>(this + 1); 77 77 } 78 79 static size_t capacityFromSize(size_t size)80 {81 return (size - sizeof(MarkStackSegment)) / sizeof(const JSCell*);82 }83 84 static size_t sizeFromCapacity(size_t capacity)85 {86 return sizeof(MarkStackSegment) + capacity * sizeof(const JSCell*);87 }88 78 89 79 static const size_t blockSize = 4 * KB; … … 112 102 113 103 private: 104 template <size_t size> struct CapacityFromSize { 105 static const size_t value = (size - sizeof(MarkStackSegment)) / sizeof(const JSCell*); 106 }; 107 114 108 JS_EXPORT_PRIVATE void expand(); 115 109 … … 125 119 BlockAllocator& m_blockAllocator; 126 120 127 size_t m_segmentCapacity;121 JS_EXPORT_PRIVATE static const size_t s_segmentCapacity = CapacityFromSize<MarkStackSegment::blockSize>::value; 128 122 size_t m_top; 129 123 size_t m_numberOfSegments;
Note:
See TracChangeset
for help on using the changeset viewer.