summaryrefslogtreecommitdiffstats
path: root/WebCore/loader/CachedResource.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/loader/CachedResource.cpp')
-rw-r--r--WebCore/loader/CachedResource.cpp16
1 files changed, 4 insertions, 12 deletions
diff --git a/WebCore/loader/CachedResource.cpp b/WebCore/loader/CachedResource.cpp
index f5ce737..b4ee533 100644
--- a/WebCore/loader/CachedResource.cpp
+++ b/WebCore/loader/CachedResource.cpp
@@ -378,18 +378,10 @@ bool CachedResource::wasPurged() const
unsigned CachedResource::overheadSize() const
{
-
- // FIXME: Find some programmatic lighweight way to calculate response size, and size of the different CachedResource classes.
- // This is a rough estimate of resource overhead based on stats collected from the stress test.
- return sizeof(CachedResource) + 3648;
-
- /* sizeof(CachedResource) +
- 192 + // average size of m_url.
- 384 + // average size of m_clients hash map.
- 1280 * 2 + // average size of ResourceResponse. Doubled to account for the WebCore copy and the CF copy.
- // Mostly due to the size of the hash maps, the Header Map strings and the URL.
- 256 * 2 // Overhead from ResourceRequest, doubled to account for WebCore copy and CF copy.
- // Mostly due to the URL and Header Map.
+ return sizeof(CachedResource) + m_response.memoryUsage() + 576;
+ /*
+ 576 = 192 + // average size of m_url
+ 384; // average size of m_clients hash map
*/
}