Chromium Code Reviews| Index: Source/core/dom/Node.cpp |
| diff --git a/Source/core/dom/Node.cpp b/Source/core/dom/Node.cpp |
| index 6490529549604567c25be4fcf3d918da4a3c43d2..eb113512c51b6a9f75dd571887ccaca9c0e6603b 100644 |
| --- a/Source/core/dom/Node.cpp |
| +++ b/Source/core/dom/Node.cpp |
| @@ -106,12 +106,15 @@ using namespace HTMLNames; |
| void* Node::operator new(size_t size) |
| { |
| ASSERT(isMainThread()); |
| - return partitionAlloc(Partitions::getObjectModelPartition(), size); |
| + void* ptr = partitionAlloc(Partitions::getObjectModelPartition(), size); |
| + Partitions::addDOMMemoryUsage(partitionAllocGetSize(ptr)); |
|
haraken
2014/05/28 07:11:34
Won't this affect performance? I think this call p
kouhei (in TOK)
2014/05/28 07:35:20
Ack. Will test.
esprehn
2014/05/28 08:38:14
Lots of nodes are not reachable or even reclaimabl
Hannes Payer (out of office)
2014/05/28 11:00:07
Is this call here causing the reported performance
eseidel
2014/05/29 05:49:49
Why would you want to report it during Node alloc?
|
| + return ptr; |
| } |
| void Node::operator delete(void* ptr) |
| { |
| ASSERT(isMainThread()); |
| + Partitions::subtractDOMMemoryUsage(partitionAllocGetSize(ptr)); |
| partitionFree(ptr); |
| } |
| #endif |