Chromium Code Reviews| Index: Source/wtf/Partitions.h |
| diff --git a/Source/wtf/WTF.h b/Source/wtf/Partitions.h |
| similarity index 81% |
| rename from Source/wtf/WTF.h |
| rename to Source/wtf/Partitions.h |
| index d42bf2a27765f71a03fec47bd7996bf4079ba8ca..c29106ec2b1f780de39c20246bb91be6348b0119 100644 |
| --- a/Source/wtf/WTF.h |
| +++ b/Source/wtf/Partitions.h |
| @@ -28,8 +28,8 @@ |
| * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| */ |
| -#ifndef WTF_h |
| -#define WTF_h |
| +#ifndef Partitions_h |
| +#define Partitions_h |
| #include "wtf/Compiler.h" |
| #include "wtf/CurrentTime.h" |
| @@ -54,11 +54,21 @@ public: |
| return m_bufferAllocator.root(); |
| } |
| + ALWAYS_INLINE static PartitionRoot* getObjectModelPartition() { return m_objectModelAllocator.root(); } |
|
Chris Evans
2015/03/30 18:41:36
Nit: "ALWAYS_INLINE static" is a different orderin
haraken
2015/03/30 23:06:18
Blink mixes both, but it seems 'ALWAYS_INLINE stat
|
| + ALWAYS_INLINE static PartitionRoot* getRenderingPartition() { return m_renderingAllocator.root(); } |
| + |
| + static size_t currentDOMMemoryUsage() |
| + { |
| + return m_objectModelAllocator.root()->totalSizeOfCommittedPages; |
| + } |
| + |
| private: |
| static bool s_initialized; |
| static PartitionAllocatorGeneric m_bufferAllocator; |
| + static SizeSpecificPartitionAllocator<3328> m_objectModelAllocator; |
| + static SizeSpecificPartitionAllocator<1024> m_renderingAllocator; |
| }; |
| } // namespace WTF |
| -#endif // WTF_h |
| +#endif // Partitions_h |