Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(487)

Unified Diff: Source/core/dom/Node.cpp

Issue 301743006: Report DOM partitionAlloc size to V8 GC. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698